velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna (JIRA)" <...@velocity.apache.org>
Subject [jira] Updated: (VELOCITY-620) Parse error creates an obscure error message
Date Wed, 01 Oct 2008 21:53:44 GMT

     [ https://issues.apache.org/jira/browse/VELOCITY-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Nathan Bubna updated VELOCITY-620:
----------------------------------

    Attachment: Velocity620TestCase.java

For the first of your examples, 1.6-dev (with the standard velocity.properties) works fine,
and for the second, i get this helpful error:

org.apache.velocity.exception.ParseErrorException: Encountered "=" at line 1, column 9 of
#if ($x = "a")
#end
Was expecting one of:
    <RPAREN> ...
    "-" ...
    "+" ...
    "*" ...
    "/" ...
    "%" ...
    <LOGICAL_AND> ...
    <LOGICAL_OR> ...
    <LOGICAL_LT> ...
    <LOGICAL_LE> ...
    <LOGICAL_GT> ...
    <LOGICAL_GE> ...
    <LOGICAL_EQUALS> ...
    <LOGICAL_NOT_EQUALS> ...


> Parse error creates an obscure error message
> --------------------------------------------
>
>                 Key: VELOCITY-620
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-620
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.6
>            Reporter: Byron Foster
>             Fix For: 1.6
>
>         Attachments: Velocity620TestCase.java
>
>
> The following incorrect velocity usage:
> #macro(foo $a)
>   blaa
> #end
> #foo("b" "c")
> or ...
> #if ($x = "a")
> #end
> will create the obscure error message in the exception:
> > Bad Reference "null" in /foo.vm:18

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org


Mime
View raw message