> From: Wascally Wabbit [mailto:[EMAIL PROTECTED] 
> 
> Ant Developers,
> 
> I've come across (ok stumbled across) an implementation
> detail of the new Ant 1.6.1 "keepGoing" mode. The way the
> code is currently written Ant keeps going even if an Error
> (not an Exception) occurs. This strikes me as very risky
> as it violates the expected response of the runtime to an 
> Error. 

There is no such thing as an expected behaviour. Whether one's
code should catch Errors or not depends on what the application 
is trying to accomplish. Errors are usually considered things
programmers do not have to deal with, but that does not mean they
are not ALLOWED to deal with them.

> The code could be easily switched to capture all 
> Exceptions instead of Throwables. Moreover, when it does 
> capture an error, Ant effectively masks the serious Error 
> with a generic BuildException (which it really isn't). Unless 
> you run Ant in debug mode you'd never actually see the root 
> cause (in the BuildException's stack dump).
> 

If the BuildException stack trace does not print the stack
trace of the nested exception (if any), well that is a bug
in the code for BuildException. We should call recursively and
print the nested exception stack trace. I agree with you on that.


> Is this a bug or a "working as designed" feature of Ant?
> 

As per my discussion on a different thread, this to me is a feature
that should be used not only for keepGoing but on the normal
treatment of exceptions thrown by <tasks>.

Jose Alberto


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to