Hello,

When Velocity code contains syntax errors and it gets evaluated, the
VelocityEngine throws ParseErrorException with a message such as:

Script content invalid: Encountered "${" at templateValidation[line 2,
column 1] Was expecting one of: <RPAREN>
... "-" ... "+" ... "*" ... "/" ... "%" ... <LOGICAL_AND> ...
<LOGICAL_OR> ... <LOGICAL_LT> ... <LOGICAL_LE> ...
<LOGICAL_GT> ... <LOGICAL_GE> ... <LOGICAL_EQUALS> ... <LOGICAL_NOT_EQUALS> ...


This error message might be hard to understand to our end users. Is there
any way to get easier to understand error message? For example, the message
above could have ">" instead of <LOGICAL_GT>, ">=" instead of <LOGICAL_GE>
etc. and it could have commas rather than triple dots.

- Is there any way to get a more user friendly validation messages?

- If not, is this something that is planned to be possible in future
versions?

- Also, if not and if we wanted to do string replace on these to make them
more user friendly, to what extent the messages are likely to change in
future versions of Velocity?

Thanks

Reply via email to