From 581316da9ceafeb016943ae3eab64c543962948a Mon Sep 17 00:00:00 2001 From: "nboyd%atg.com" Date: Sun, 7 Oct 2001 18:44:39 +0000 Subject: [PATCH] Fix for problem: There is a bug in JavaScriptException which prevents it from being used with out a Rhino Context. When the getMessage() method is invoked on it, the exception goes to the ScriptRuntime to toString the value. If you have already exited your context, the runtime will throw an error. The solution is to simply remove the overridden getMessage method from JavaScriptException. JavaScriptException's constructor calls the Exception constructor with the toString'ed value. The default implementation of getMessage will return the exception message. Jeff git-svn-id: svn://10.0.0.236/trunk@104772 18797224-902f-48f8-a5cc-f745e15eee43 --- .../src/org/mozilla/javascript/JavaScriptException.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/mozilla/js/rhino/src/org/mozilla/javascript/JavaScriptException.java b/mozilla/js/rhino/src/org/mozilla/javascript/JavaScriptException.java index 4b9c766199c..a18c853954b 100644 --- a/mozilla/js/rhino/src/org/mozilla/javascript/JavaScriptException.java +++ b/mozilla/js/rhino/src/org/mozilla/javascript/JavaScriptException.java @@ -58,15 +58,6 @@ public class JavaScriptException extends Exception { this.value = value; } - /** - * Get the exception message. - * - *

Will just convert the wrapped exception to a string. - */ - public String getMessage() { - return ScriptRuntime.toString(value); - } - static JavaScriptException wrapException(Scriptable scope, Throwable exn) {