diff options
Diffstat (limited to 'libjava/java/lang/ClassLoader.java')
-rw-r--r-- | libjava/java/lang/ClassLoader.java | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/libjava/java/lang/ClassLoader.java b/libjava/java/lang/ClassLoader.java index a6faa61..2c0e211 100644 --- a/libjava/java/lang/ClassLoader.java +++ b/libjava/java/lang/ClassLoader.java @@ -432,17 +432,24 @@ public abstract class ClassLoader { synchronized (clazz) { - try { - linkClass0 (clazz); - } catch (Throwable x) { - markClassErrorState0 (clazz); - - if (x instanceof Error) - throw (Error)x; - else - throw new java.lang.InternalError - ("unexpected exception during linking: " + x); - } + try + { + linkClass0 (clazz); + } + catch (Throwable x) + { + markClassErrorState0 (clazz); + + if (x instanceof Error) + throw (Error)x; + else + { + InternalError e + = new InternalError ("unexpected exception during linking"); + e.initCause (x); + throw e; + } + } } } |