You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Malcolm Edgar <ma...@gmail.com> on 2006/03/04 09:31:12 UTC

Error handling with

Hi All,

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

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


Re: Error handling with

Posted by Will Glass-Husain <wg...@forio.com>.
Thanks - good feedback.  Can you please raise a JIRA issue on this?

WILL


On 3/4/06, Malcolm Edgar <ma...@gmail.com> wrote:
>
> Hi All,
>
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>


--
_______________________________________
Forio Business Simulations

Will Glass-Husain
phone (415) 440-7500 x89
mobile (415) 235-4293
wglass@forio.com
www.forio.com