You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Will Glass-Husain (JIRA)" <ji...@apache.org> on 2006/11/05 07:04:18 UTC

[jira] Resolved: (VELOCITY-435) ParseErrorException not thrown with #macro parse error

     [ http://issues.apache.org/jira/browse/VELOCITY-435?page=all ]

Will Glass-Husain resolved VELOCITY-435.
----------------------------------------

    Resolution: Fixed

Fix applied.  Need to set property "velocimacro.arguments.strict" to true for the exception to be thrown.  Thanks for the idea, Malcom!

> ParseErrorException not thrown with #macro parse error
> ------------------------------------------------------
>
>                 Key: VELOCITY-435
>                 URL: http://issues.apache.org/jira/browse/VELOCITY-435
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.5
>         Environment: Windows XP, JDK 1.4.2_09
>            Reporter: Malcolm Edgar
>         Assigned To: Will Glass-Husain
>             Fix For: 1.5
>
>         Attachments: macroargumenterror.patch
>
>
> I have just been reviewing the new error handlingin Velocity 1.5-dev.
> One change I have observed it that an invalid macro call, passing 2
> arguments instead of one will log an error message:
> [Velocity] [error] VM #writeForm: error : too many arguments to macro.
> Wanted 1 got 2
> [Velocity] [error] VM error writeForm. Null AST
> However it will not throw an ParseErrorException like it used to in
> 1.5-dev. Please see the example below for the earlier behaviour:
> http://www.sunvolt.com/click-examples/exception.htm?actionLink=brokenBorderLink#
> I prefer earlier approach, as the error is explicit. The new approach
> logs an error message, but beyond that you would not have known that
> an error occured. The #writeForm() call is not even rendered, as is
> done with an invalid object reference.
> regards Malcolm Edgar

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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