I like onFail attribute slightly better then current nant.onfailure. Setting
some special property looks little weird for me. But it is enough for most
projects, I think.

Martin

> Hello Gert,
>
> such a task does really makes sense, still, I feel we have two
> (a bit) different approaches to solve the problem.
>
> There is one "pro" for my approach -- it is possible to add "onfail"
> attribute to a target element, thus, if target B depends on A, the B
> gets executed and A fails during dependant targets execution, we can
> do something on A failure:
>
> <project default="B">
>   <target name="B" depends="A">
>     ...
>   </target>
>   <target name="A" onfail="A.failed">
>     ...
>   </target>
>   ...
> </project>
>
> Probably, there is some sense in combining both of the approaches:
> implementing <trycatch> task and leaving "onfail" attribute for target
> only (I'd added it for task first and the next day found out, that I
> need to handle the case similar to the one I've described above, so I
> added it for target also).
>
> Anyway, whatever the final idea of the solution will be, I'm ready to
> participate in its development.
>
> GD> ----- Original Message ----- 
> GD> From: "Ivan Tarasov" <[EMAIL PROTECTED]>
> GD> To: "Gert Driesen" <[EMAIL PROTECTED]>
> GD> Sent: Wednesday, October 08, 2003 7:24 PM
> GD> Subject: Re[2]: [nant-dev] onFail patch
>
>
> >> Hello Gert,
> >>
> >> the problem is, that I don't want to get all the log (I want to track
> >> the subproject, which failed), and also, I want more than just sending
> >> e-mail. Here is one of the scenarios (again, the simplified one):
> >>
> >> just before the build, on the build script I check out build version
> >> file, then I increment the version and try to compile. In case of
> >> compilation failure I need to undo the checkout of the build version
> >> file.
> >>
> >> I consider, there is need for some kind of "destructor" or
"catch/finally"
> >> construct, the patch covers some part of these functionality.
>
> GD> Ant actually solved this by adding a trycatch task (in AntContrib,
> GD> http://ant-contrib.sourceforge.net/tasks/trycatch.html)
>
> GD> Gert
>
>
> -- 
> Best regards,
>  Ivan                            mailto:[EMAIL PROTECTED]
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> SourceForge.net hosts over 70,000 Open Source Projects.
> See the people who have HELPED US provide better services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> nant-developers mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-developers
>
>




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to