diff --git a/js/rhino/toolsrc/org/mozilla/javascript/tools/shell/Main.java b/js/rhino/toolsrc/org/mozilla/javascript/tools/shell/Main.java index 6a6f459cbfaa..124d8b19307e 100644 --- a/js/rhino/toolsrc/org/mozilla/javascript/tools/shell/Main.java +++ b/js/rhino/toolsrc/org/mozilla/javascript/tools/shell/Main.java @@ -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); } /**