28 Nov
2014
28 Nov
'14
9:17 p.m.
Said Vincent:
and can this be caught within the Velocity or Groovy code that calls it?
errors are automatically caught in the script macros ({{velocity}}, {{groovy}}, etc).
OK, looks like Groovy has explicit try/catch (http://groovy.codehaus.org/JN3035-Exceptions). I couldn't see anything about Velocity catching exceptions (only about Velocity throwing exceptions - http://velocity.apache.org/engine/devel/developer-guide.html#exceptions). So if I have a component that I call from velocity with $mycomponent.foo() and the method throws an exception (IOException, for instance), can I control what the Velocity script does about this?