----- Original Message -----
From: "Peter Donald" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 10, 2002 1:25 AM
Subject: TryCatchFinallyTask ?


> Hi,
>
> I can't recall if this has been rejected before but I going to propose it
> again ;)
>
> Error handling in ant sucks - I have come across two today places where I
> have really wanted better handling of that sort of thing. Sometimes tasks
> throw errors that you want to respond to (ie send a mail) others throw
errors
> you can ignore (ie maudit) and in many cases you want to cleanup after you
> regardless fo success or not (delete that null.tmp!).
>
>
> Anyways I prototyped something like this for ant2 and while it hasn't been
> tested in all the places I wanted to use it - I did really like it in the
few
> places I have tested it. Basically you have as task container that looks
like
> the following. it also behaves in exactly the same way that java languaghe
> try-catch-finally constructs work.
>
> It would look like
>
> <tbody>
>   <try>
>     <echo message="About to fail"/>
>     <fail message="Failing!"/>
>   </try>
>   <catch>
>     <echo message="the task failed but we are ignoring it"/>
>   </catch>
>   <finally>
>     <echo message="Cleaning up after myself ..."/>
>   </finally>
> </tbody>
>

How does this differ from the stuff in ant-contrib on sforge?


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

Reply via email to