Those error messages are generated by the javacc parser.

I didn't find any information on error messages customization in javacc
(which doesn't mean that it doesn't exist).

I don't think they are going to change very soon, unless we decide to
radically move from javacc to another parser, which is not going to
happen in a near future.


  Claude

On Thu, 31 May 2012 17:11:53 -0400
Artur Tomusiak <artur.tomus...@hannonhill.com> wrote:

> 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


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org
For additional commands, e-mail: user-h...@velocity.apache.org

Reply via email to