throw EvaluatorException instead of RuntimeException to prevent Rhino exception wrapping

This commit is contained in:
hns 2003-10-23 11:44:58 +00:00
parent 72e12535f6
commit ccf197aeac

View file

@ -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");
}