Browse Source

subant: catch throwables from ant.execute() with failonerror is false

PR:  27007
Reported by: Mariano Benitez


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276102 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 21 years ago
parent
commit
76a6e36fe5
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      src/main/org/apache/tools/ant/taskdefs/SubAnt.java

+ 8
- 0
src/main/org/apache/tools/ant/taskdefs/SubAnt.java View File

@@ -187,6 +187,14 @@ public class SubAnt
log("Failure for target '" + target log("Failure for target '" + target
+ "' of: " + antfilename + "\n" + "' of: " + antfilename + "\n"
+ e.getMessage(), Project.MSG_WARN); + 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);
} }
} }




Loading…
Cancel
Save