ClassLoader.java (resolveClass0): Set cause for newly-created exception.
* java/lang/ClassLoader.java (resolveClass0): Set cause for newly-created exception. From-SVN: r57310
This commit is contained in:
parent
cc7ab9b79c
commit
b5f4221e51
2 changed files with 22 additions and 10 deletions
|
@ -432,17 +432,24 @@ public abstract class ClassLoader
|
|||
{
|
||||
synchronized (clazz)
|
||||
{
|
||||
try {
|
||||
linkClass0 (clazz);
|
||||
} catch (Throwable x) {
|
||||
markClassErrorState0 (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);
|
||||
}
|
||||
if (x instanceof Error)
|
||||
throw (Error)x;
|
||||
else
|
||||
{
|
||||
InternalError e
|
||||
= new InternalError ("unexpected exception during linking");
|
||||
e.initCause (x);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue