Using Kit.initCause to wrap the original exception preventing creation of SecurityController class.

This commit is contained in:
igor%mir2.org 2004-08-14 16:42:33 +00:00
parent e1db421213
commit eed65b7987

View File

@ -229,16 +229,17 @@ public class Main {
("org.mozilla.javascript.tools.shell.JavaPolicySecurity");
securityImpl = (SecurityProxy)cl.newInstance();
return;
}catch (ClassNotFoundException ex) {
} catch (ClassNotFoundException ex) {
exObj = ex;
}catch (IllegalAccessException ex) {
} catch (IllegalAccessException ex) {
exObj = ex;
}catch (InstantiationException ex) {
} catch (InstantiationException ex) {
exObj = ex;
}catch (LinkageError ex) {
} catch (LinkageError ex) {
exObj = ex;
}
throw new RuntimeException("Can not load security support: "+exObj);
throw Kit.initCause(new IllegalStateException(
"Can not load security support: "+exObj), exObj);
}
/**