« Return to Thread: On error Redo some TasK

Re: On error Redo some TasK

by David Weintraub :: Rate this Message:

Reply to Author | View in Thread

Ant usually fails on a failed task. There are certain tasks where this
rule could be overturned "those with a "failson" parameter, but most
of the time, if something fails, you really want to stop the build
process.

However, there is a special task in the AntContrib directory that I've
used before called <trycatch>. This task will execute a particular set
of tasks, then if there is an error, you can catch it and do something
else:

On Tue, May 13, 2008 at 2:06 AM, Carlos Ortiz <chrono.dark@...> wrote:

> Hi,Here is my question, how do i redo or execute some task's when another
>  fail
>
>  for example , if targetA fail go to onErrorTargetATarget...
>
>   <target name="targetA" >
>         ....
>     </target>
>
>   <target name="onErrorTargetATarget" >
>         ....
>  <delete ..... />
>     </target>
>
>  been the main mainTarget
>
>
>   <target name="mainTarget" depends="targetA, targetB, targetC" >
>         ....
>     </target>
>
>  thks in advance
>



--
--
David Weintraub
qazwart@...

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@...
For additional commands, e-mail: user-help@...

 « Return to Thread: On error Redo some TasK

LightInTheBox - Buy quality products at wholesale price