Browse Source

Don't catch stuff thrown in System.exit

PR: 9414


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272868 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 23 years ago
parent
commit
c3e3cee3b0
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      src/main/org/apache/tools/ant/Main.java

+ 4
- 3
src/main/org/apache/tools/ant/Main.java View File

@@ -191,18 +191,18 @@ public class Main {
}
}

// expect the worst
int exitCode = 1;
try {
m.runBuild(coreLoader);
System.exit(0);
exitCode = 0;
} catch (BuildException be) {
if (m.err != System.err) {
printMessage(be);
}
System.exit(1);
} catch (Throwable exc) {
exc.printStackTrace();
printMessage(exc);
System.exit(1);
} finally {
if (isLogFileUsed) {
if (out != null) {
@@ -221,6 +221,7 @@ public class Main {
}
}
}
System.exit(exitCode);
}

/**


Loading…
Cancel
Save