The batchfile has to return an exit code itself. 
Otherwise cmd will exit with 0 and Ant recieves that 0.

See ant.bat how to "throw an error" in a batchfile (I think it uses "color" for 
that ...)


Jan 

>-----Ursprüngliche Nachricht-----
>Von: Knuplesch, Jürgen [mailto:[EMAIL PROTECTED] 
>Gesendet: Freitag, 12. Oktober 2007 12:10
>An: [email protected]
>Betreff: Errorhandling using exec and cmd.exe
>
>
>Hello,
>
>We have an Ant-File that executes a Batch-File (Windows .bat) 
>and if the Batchfile fails,
>We get a return code=0.
>But we want to evaluate errors. 
>
>How can the Batchfile tell the ANT-Skript that an error occurred?
>
>Greetings
>
>Jürgen
>
>
>-- 
>Jürgen Knuplesch                    www.icongmbh.de
>icon Systemhaus GmbH                Tel. +49 711 806098-275
>Sophienstraße 40                    
>D-70178 Stuttgart                   Fax. +49 711 806098-299
>
>Geschäftsführer: Uwe Seltmann
>HRB Stuttgart 17655
>USt-IdNr.: DE 811944121 
>
>---------------------------------------------------------------------
>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]

Reply via email to