You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Roman Rytov <rr...@entopia.com> on 2003/01/13 17:05:44 UTC

Is there a way to catch FAILURE case?

In my script I access VSS and at the beginning check out some files. At
the end of the script I check them in back. I want to catch all failure
situations and to make logical action (check those files in in my case).
Is there a way to apply a kind of FINALLY in Ant?

Roman Rytov

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Is there a way to catch FAILURE case?

Posted by Dale Anson <da...@germane-software.com>.
Hi Roman,

I've written a try/catch/finally task that I'm in the process of getting 
ready for submitting to the ant-dev group for consideration. You can 
download it at

http://prdownloads.sourceforge.net/antelope/Antelope_tasks_2.17.zip?download

This zip contains some other tasks that you may or may not want. Docs 
are included in the zip.

Basically, you use the task like this:

<target name=...>
    <try>
        <!-- put your tasks here -->

        <catch>
            <!-- do failure handling tasks here -->
        </catch>

        <finally>
            <!-- like java, this is optional -->
        </finally>
    </try>
</target>

Dale Anson
danson@germane-software.com

Roman Rytov wrote:

>In my script I access VSS and at the beginning check out some files. At
>the end of the script I check them in back. I want to catch all failure
>situations and to make logical action (check those files in in my case).
>Is there a way to apply a kind of FINALLY in Ant?
>
>Roman Rytov
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>