ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Continue after a failing ant task
Date Wed, 23 Jan 2002 08:25:42 GMT
On Wed, 23 Jan 2002 14:41, Daniel Ritchey wrote:
> I posted a little container task to ant-user a few days back called Error
> Catcher (under which is basically the Sequential
> container task with a try catch block around the execution of the contained
> tasks (I have since renamed the task to simply Try).  I don't have the code
> handy, but if you look at the Sequential container task code, it shouldn't
> be hard to implement your own.
> It looked like something to the effect of
> <errorcatcher errorproperty="build.failure">
>    <ant dir="./foo" />
> </errorcatcher>
> The property build.failure would only get created if an exception would
> occur and the properties value would be the exception message.

I have actually been experimenting with something like that - actually

    ...insert tasks here ...
    ...tasks ran on error...
    ...tasks always ran at end...

however your syntax is much simpler - but doesn't support <finally/> - have 
you ever needed this? Or is it safe to say that it is not needed?



"When we remember we are all mad, the mysteries of life 
disappear and life stands explained." -Mark Twain

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message