ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peter.rei...@corvil.com>
Subject Re: Ant 1.6.1 Converting Errors To Exceptions...Good|Bad?
Date Thu, 19 Feb 2004 10:33:30 GMT
Jose Alberto Fernandez wrote:

>>From: Wascally Wabbit [mailto:wascallywabbit@earthling.net] 
>>
>>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.
>  
>
This is especially true for ant when some "Errors" happen due
to classloader issues.

>  
>
>>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.
>  
>
+1

>
>  
>
>>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: dev-unsubscribe@ant.apache.org
>For additional commands, e-mail: dev-help@ant.apache.org
>
>
>
>  
>


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


Mime
View raw message