ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <dona...@apache.org>
Subject Re: onFailure
Date Mon, 29 Jan 2001 12:15:42 GMT
At 06:33  29/1/01 -0500, David Corbin wrote:
>I spent several hours working a new feature for Ant on Friday.  This
>would be my first contribution to Ant.  Then sometime this weekend I saw
>a message on Ant-dev, and I began to wonder if this belongs in Ant.  So,
>I throw this out on the table for discussion.

It has been a much discussed thing of the past and has been vetoed every
time it has come up for various reasons. However you just gave me another
idea - what if we extended BuildListener so that it had the callbacks

void taskFailed( BuildException be );
void taskError( Throwable t );

where taskFailed would be call when a BuildException is detected and
taskError would be called on catching a NullPointner/other runtime
exception/error.

Now the default implementation would just rethrow the exception and thinks
would operate 100% like they do now but other implementations could choose
to "consume" the error and keep going on. Just a thought - thoughts ?


 
Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Mime
View raw message