Hi,
Wanted to ask for some quick feedback on VELOCITY-435. One of the
directions for Velocity 1.5 that's emerged is better error handling. Most
stuff that used to be logged can now be trapped and reported. One exception
is macro callswith an invalid numbers of arguments. Error messages are
buried in a log, there's no way to trap them and make them more visible.
Example error:
#macro(foo $a) $a #end
#foo("test1" "test2")
Ideally, this would throw a ParseErrorException, but it can't due to
backwards compatibility. (lots of existing templates with this problem would
break). This would enable functionality like this (courtesy of Malcolm
Edgars)
http://www.sunvolt.com/click-examples/exception.htm?actionLink=brokenBorderLink#
Some solutions - any feedback?
(1) yet another configuration option
runtime.macros.strict = true
(2) yet another event handler. I've already got an
"InvalidReferenceEventHandler" in progress, this could be a new method for
that.
(3) something more creative?
Thanks, WILL
--
Forio Business Simulations
Will Glass-Husain
[EMAIL PROTECTED]
www.forio.com