(was [PATCH] org.apache.velocity.texen.ant.TexenTask (exception handling 
and documentation))

what should an ant task do when an exception occurs?
at the moment, texen's strategy is to swallow exceptions.
if you're using texen to generate code, then this is a weakness.
code generation build files typically contain compilation tasks in 
addition to generation tasks.
since texen does not allow exceptions to propagate up to ant,  this 
means that ant continues and executes any subsequent tasks in the build 
file. for code generation this is really annoying since compilation etc 
will be attempted even when a generation has failed.

the patch i submitted last week improves the situation (as well as 
printing more useful messages) but IMHO doesn't go far enough. i really 
think that the strategy should be changed. Public and protected methods 
should throw ant BuildExceptions and these should be propagated up 
through the execute method to ant. This would allow subclasses to thrown 
a BuildException and stop the build going any further.

comments?

- robert

Reply via email to