Here is a little container task I wrote that executes its tasks in
sequential order but it will catch any BuildException that occurs.   If an
exception occurs it will place the exception message in a new property with
the name of your choosing.  The code is pretty trivial, but I have found it
to useful.  Feel free to use it however you see fit.

Example build.xml ...

<project default="test">

     <target name="test">
          <taskdef name="errorcatcher" classname
="ErrorCatcherTaskContainer"/>

          <errorcatcher errorproperty="error.message">
               <fail message="testing testing testing 1 2 3" />
          </errorcatcher>

          <echo message="${error.message}" />
     </target>

</project>

(See attached file: ErrorCatcher.zip)

Attachment: ErrorCatcher.zip
Description: Zip archive

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

Reply via email to