From 1511487597b2dfa9391f80564f09d13a12418911 Mon Sep 17 00:00:00 2001 From: Jacobus Martinus Kruithof Date: Sun, 22 May 2005 16:13:54 +0000 Subject: [PATCH] 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). git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278323 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/Diagnostics.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/org/apache/tools/ant/Diagnostics.java b/src/main/org/apache/tools/ant/Diagnostics.java index 51788e49a..ef2444d47 100644 --- a/src/main/org/apache/tools/ant/Diagnostics.java +++ b/src/main/org/apache/tools/ant/Diagnostics.java @@ -362,7 +362,7 @@ public final class Diagnostics { } 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"); } }