OK, I'll do that.... figured that another way to go about this is to add a get and set status method to the BuildException, with a default value of one.... not really needed to have a new exception, what do you think?
Peter Reilly wrote:


Yep, sounds good.

Peter
Matt Benson wrote:

Yeah, it looks like Conor had it right.  I hadn't
remembered that the System.exit() was still called in
Main even though oata.launch.Launcher invokes
Main.start()... Your approach should work, then.  I
would say open an enhancement request in Bugzilla...

-Matt

--- Aurele Venet <[EMAIL PROTECTED]> wrote:


Although I developed this on the back of ant 1.5, I
used an extended BuildException, ExitStatusException, which stored an
exit status. I then modified ant's Main class to catch the Exit
exception if there is one and exit with the set status. I guess this
should still work by modifying the new Launcher class (?). Matt Benson wrote:




While that's essentially a nice idea, the only

thing


<fail> currently does is throw a BuildException...

how


do you propose to pass this status all the way out

of


the JVM, especially when you really can't be sure
whose main method is the starting point... usu.
oata.launch.Launcher--which incidentally doesn't

even


call System.exit() itself... IIRC calling
System.exit() would be a de-evolution of Ant...

-Matt

--- Aurele Venet <[EMAIL PROTECTED]> wrote:




Hello,

I have changed the <fail/> task so as to be able

to


add an optional error status int value returned by ant when and if
it exists.  Basically it goes like:

<fail message="" unless="prop1" status="1"/>

this allows for easier integration with automated
shell scripts that may report various causes for errors or warnings.

Would


this be a valuable addition to the main distro?

Vrata

--



_______________________________________________________________________






Quote: The surest sign that intelligent life

exists


elsewhere in the
universe is the fact that it has never

tried


to contact us.

Aurele Vrata Venet
ESA/ESAC
European Space Astronomy Center
P.O. Box 50727, 28080 Madrid - SPAIN
Tel: +34 91 81 31 331 Fax: +34 91 81 31 322
Ext: 322




               ;


_______________________________________________________________________







---------------------------------------------------------------------






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




__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We

finish.


http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------


To unsubscribe, e-mail:

[EMAIL PROTECTED]


For additional commands, e-mail:

[EMAIL PROTECTED]






---------------------------------------------------------------------


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






__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail


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







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



--

_______________________________________________________________________
Quote: The surest sign that intelligent life exists elsewhere in the
       universe is the fact that it has never tried to contact us.

Aurele Vrata Venet
ESA/ESAC
European Space Astronomy Center
P.O. Box 50727, 28080 Madrid - SPAIN
Tel: +34 91 81 31 331 Fax: +34 91 81 31 322
Ext: 322 ;
_______________________________________________________________________



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



Reply via email to