peterreilly    2004/02/17 07:41:05

  Modified:    src/main/org/apache/tools/ant/taskdefs SubAnt.java
  Log:
  subant: catch throwables from ant.execute() with failonerror is false
  PR:  27007
  Reported by: Mariano Benitez
  
  Revision  Changes    Path
  1.14      +8 -0      ant/src/main/org/apache/tools/ant/taskdefs/SubAnt.java
  
  Index: SubAnt.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/SubAnt.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SubAnt.java       9 Feb 2004 21:05:20 -0000       1.13
  +++ SubAnt.java       17 Feb 2004 15:41:04 -0000      1.14
  @@ -187,6 +187,14 @@
               log("Failure for target '" + target
                  + "' of: " +  antfilename + "\n"
                  + e.getMessage(), Project.MSG_WARN);
  +        } catch (Throwable e) {
  +            if (failOnError) {
  +                throw new BuildException(e);
  +            }
  +            log("Failure for target '" + target
  +                + "' of: " + antfilename + "\n"
  +                + e.toString(),
  +                Project.MSG_WARN);
           }
       }
   
  
  
  

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

Reply via email to