From 736c8aa7e19c25a2585870e8aa2978083ded424f Mon Sep 17 00:00:00 2001 From: "igor%mir2.org" Date: Sat, 14 Aug 2004 16:42:33 +0000 Subject: [PATCH] Using Kit.initCause to wrap the original exception preventing creation of SecurityController class. git-svn-id: svn://10.0.0.236/trunk@160764 18797224-902f-48f8-a5cc-f745e15eee43 --- .../org/mozilla/javascript/tools/shell/Main.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mozilla/js/rhino/toolsrc/org/mozilla/javascript/tools/shell/Main.java b/mozilla/js/rhino/toolsrc/org/mozilla/javascript/tools/shell/Main.java index 6a6f459cbfa..124d8b19307 100644 --- a/mozilla/js/rhino/toolsrc/org/mozilla/javascript/tools/shell/Main.java +++ b/mozilla/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); } /**