You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by jk...@apache.org on 2005/05/22 18:13:54 UTC
cvs commit: ant/src/main/org/apache/tools/ant Diagnostics.java
jkf 2005/05/22 09:13:54
Modified: src/main/org/apache/tools/ant Diagnostics.java
Log:
Avoiding to catch unspecified Error. The context indicates we want to continue even when loading a class is unsuccessful. The only Error we expect and want to continue on would in that case be LinkageError (and not e.g ThreadDeath / VirtualMachineError).
Revision Changes Path
1.28 +1 -1 ant/src/main/org/apache/tools/ant/Diagnostics.java
Index: Diagnostics.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Diagnostics.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- Diagnostics.java 7 Apr 2005 17:59:11 -0000 1.27
+++ Diagnostics.java 22 May 2005 16:13:54 -0000 1.28
@@ -362,7 +362,7 @@
} catch (NoClassDefFoundError e) {
String pkg = e.getMessage().replace('/', '.');
out.println(key + " : Missing dependency " + pkg);
- } catch (Error e) {
+ } catch (LinkageError e) {
out.println(key + " : Initialization error");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org