Re: ant-contrib <trycatch> task issue!

Bharath <[email protected]> Fri, 12 Sep 2008 01:38:47 -0700
Newsgroups gmane.comp.java.ant-contrib.devel
Message-ID <[email protected]>
Got it. Let me throw an ant contrib BuildException and try to catch it.
Appreciate the response!

On Thu, Sep 11, 2008 at 11:08 PM, Jack Woehr <[email protected]> wrote:

>  Bharath wrote:
>
> I'm using the ant contrib's <trycatch> task in an ANT script. My goal is to
> invoke a Java class within the <try> block and catch an exception if my Java
> class throws one in my <catch> block.
>
> Hi Bharath --
>
> W/r/t Ant-contrib <trycatch> , here is a snippet from the documentation:
>
> *This mirrors Java's try/catch/finally.
> *
>
> "Mirrors" meaning to say "is analogous to".
>
> *The tasks inside of the required <try> element will be run. If one of
> them should throw a BuildException several things can happen:*
>
> ... etc.
>
> Does your failing Java class test throw an Ant-contrib BuildException? I
> take the documentation
> to mean that only a BuildException being thrown will be caught in the
> <catch> block. It is not
> a universal Java try/catch facility.
>
> --
> Jack J. Woehr            # "Self-delusion ishttp://www.well.com/~jax <http://www.well.com/%7Ejax> #  half the battle!"http://www.softwoehr.com #  - Zippy the Pinhead
>
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

_______________________________________________
Ant-contrib-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ant-contrib-developers