From 0fef686226384bb4f3c3ee5fb94daea031e2cf13 Mon Sep 17 00:00:00 2001 From: "nboyd%atg.com" Date: Thu, 30 Aug 2007 13:48:13 +0000 Subject: [PATCH] * No need to report both an error to the console and throw and exception. * Prettier message for uncaught EvaluatorExceptions git-svn-id: svn://10.0.0.236/trunk@233395 18797224-902f-48f8-a5cc-f745e15eee43 --- .../org/mozilla/javascript/tools/ToolErrorReporter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mozilla/js/rhino/toolsrc/org/mozilla/javascript/tools/ToolErrorReporter.java b/mozilla/js/rhino/toolsrc/org/mozilla/javascript/tools/ToolErrorReporter.java index 7e7ddbc44e9..d0f514cd37e 100644 --- a/mozilla/js/rhino/toolsrc/org/mozilla/javascript/tools/ToolErrorReporter.java +++ b/mozilla/js/rhino/toolsrc/org/mozilla/javascript/tools/ToolErrorReporter.java @@ -111,6 +111,8 @@ public class ToolErrorReporter implements ErrorReporter { msg = getMessage("msg.uncaughtJSException", ex.details()); } else if (ex instanceof EcmaError) { msg = getMessage("msg.uncaughtEcmaError", ex.details()); + } else if (ex instanceof EvaluatorException) { + msg = ex.details(); } else { msg = ex.toString(); } @@ -138,7 +140,6 @@ public class ToolErrorReporter implements ErrorReporter { int line, String lineSource, int lineOffset) { - error(message, sourceName, line, lineSource, lineOffset); return new EvaluatorException(message, sourceName, line, lineSource, lineOffset); }