Browse Source

InstantiationException.getCause() not in jdk 1.3.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276833 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 20 years ago
parent
commit
e9930da203
1 changed files with 1 additions and 13 deletions
  1. +1
    -13
      src/main/org/apache/tools/ant/launch/Launcher.java

+ 1
- 13
src/main/org/apache/tools/ant/launch/Launcher.java View File

@@ -222,19 +222,7 @@ public class Launcher {
AntMain main = (AntMain) mainClass.newInstance(); AntMain main = (AntMain) mainClass.newInstance();
main.startAnt(newArgs, null, null); main.startAnt(newArgs, null, null);
} catch (Throwable t) { } catch (Throwable t) {
if (t instanceof InstantiationException) {
t.printStackTrace();
InstantiationException ie = (InstantiationException) t;
if (ie.getCause() == null) {
System.err.println("Instantiation Exception - root cause: "
+ ie.getCause());
} else {
System.err.println("Instantiation Exception - root cause:");
ie.getCause().printStackTrace();
}
} else {
t.printStackTrace();
}
t.printStackTrace();
} }
} }
} }


Loading…
Cancel
Save