Browse Source

Preserve exit status on error in <ant>/<antcall>

master
Anthony Wat Stefan Bodewig 9 years ago
parent
commit
04f501e77a
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      src/main/org/apache/tools/ant/ProjectHelper.java

+ 7
- 0
src/main/org/apache/tools/ant/ProjectHelper.java View File

@@ -562,6 +562,13 @@ public class ProjectHelper {
+ System.getProperty("line.separator")
+ ex.getLocation().toString()
+ ex.getMessage();
if (ex instanceof ExitStatusException) {
int exitStatus = ((ExitStatusException) ex).getStatus();
if (newLocation == null) {
return new ExitStatusException(errorMessage, exitStatus);
}
return new ExitStatusException(errorMessage, exitStatus, newLocation);
}
if (newLocation == null) {
return new BuildException(errorMessage, ex);
}


Loading…
Cancel
Save