Question about validation error messages

Artur Tomusiak <[email protected]>
Newsgroups gmane.comp.jakarta.velocity.user
Message-ID <CABZ+j-MWOD2zTUToUpKjMny8eqFJSkJ0bZXik5Tt9rw8CFxgKg@mail.gmail.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.