From ccf197aeacd43c8d3b4795190480cab9508fd246 Mon Sep 17 00:00:00 2001 From: hns Date: Thu, 23 Oct 2003 11:44:58 +0000 Subject: [PATCH] throw EvaluatorException instead of RuntimeException to prevent Rhino exception wrapping --- src/helma/scripting/rhino/RhinoCore.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/helma/scripting/rhino/RhinoCore.java b/src/helma/scripting/rhino/RhinoCore.java index 2eaca0e3..1210de7a 100644 --- a/src/helma/scripting/rhino/RhinoCore.java +++ b/src/helma/scripting/rhino/RhinoCore.java @@ -361,11 +361,11 @@ public final class RhinoCore { */ public Scriptable getValidPrototype(String protoName) { if (globalError != null) { - throw new RuntimeException(globalError.toString()); + throw new EvaluatorException(globalError.toString()); } TypeInfo type = getPrototypeInfo(protoName); if (type != null && type.error != null) { - throw new RuntimeException(type.error.toString()); + throw new EvaluatorException(type.error.toString()); } return type == null ? null : type.objectPrototype; } @@ -640,11 +640,11 @@ public final class RhinoCore { result = engine.invoke(handler, hrefFunction, new Object[] { basicHref }, false); } catch (ScriptingException x) { - throw new RuntimeException("Error in hrefFunction: " + x); + throw new EvaluatorException("Error in hrefFunction: " + x); } if (result == null) { - throw new RuntimeException("hrefFunction " + hrefFunction + + throw new EvaluatorException("hrefFunction " + hrefFunction + " returned null"); }