ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Peerman" <>
Subject Try task
Date Thu, 14 Nov 2002 15:14:31 GMT
I have developed a Try Task which calls another target on a "Build
Exception", I have been using it now to two weeks and it seems to work quite

  <?xml version="1.0"?>

  <project name="TryExample" default="main" basedir=".">
    <!-- Used to load the task -->
    <taskdef name="try" classname="ant.Try"/>

    <!-- Main build method -->
    <target name="main">
      <!-- Try is a wrapper for other tasks. If an error occurs the target
           errorhandler is called
      <try handler="errorhandler">
        <javac srcdir="." destdir="."/>

    <target name="errorhandler">
      <echo "error occured"/>

I was wondering whether it would be useful in the ANT project.

Yours sincerely,

Christopher Peerman.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message