diff options
author | mkersten <mkersten> | 2003-08-08 15:29:37 +0000 |
---|---|---|
committer | mkersten <mkersten> | 2003-08-08 15:29:37 +0000 |
commit | b3229c893771136cbc766dd28724b1049b1294d0 (patch) | |
tree | 6bf6d4b223e1b744e9771d5bead7a6954cea4ad3 /util | |
parent | 22f8fea5cf4db140163574646d68acc487a424ae (diff) | |
download | aspectj-b3229c893771136cbc766dd28724b1049b1294d0.tar.gz aspectj-b3229c893771136cbc766dd28724b1049b1294d0.zip |
Fixed unwrapping of exceptions (was infinte looping).
Diffstat (limited to 'util')
-rw-r--r-- | util/src/org/aspectj/util/LangUtil.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/src/org/aspectj/util/LangUtil.java b/util/src/org/aspectj/util/LangUtil.java index 800575b25..e51718706 100644 --- a/util/src/org/aspectj/util/LangUtil.java +++ b/util/src/org/aspectj/util/LangUtil.java @@ -806,18 +806,18 @@ public class LangUtil { public static Throwable unwrapException(Throwable t) { Throwable current = t; Throwable next = null; - while (current != null) { + while (current != null) { // Java 1.2 exceptions that carry exceptions if (current instanceof InvocationTargetException) { - next = ((InvocationTargetException) t).getTargetException(); - } else if (t instanceof ClassNotFoundException) { - next = ((ClassNotFoundException) t).getException(); - } else if (t instanceof ExceptionInInitializerError) { - next = ((ExceptionInInitializerError) t).getException(); - } else if (t instanceof PrivilegedActionException) { - next = ((PrivilegedActionException) t).getException(); - } else if (t instanceof SQLException) { - next = ((SQLException) t).getNextException(); + next = ((InvocationTargetException) current).getTargetException(); + } else if (current instanceof ClassNotFoundException) { + next = ((ClassNotFoundException) current).getException(); + } else if (current instanceof ExceptionInInitializerError) { + next = ((ExceptionInInitializerError) current).getException(); + } else if (current instanceof PrivilegedActionException) { + next = ((PrivilegedActionException) current).getException(); + } else if (current instanceof SQLException) { + next = ((SQLException) current).getNextException(); } // ...getException(): // javax.naming.event.NamingExceptionEvent |