From 8d9c6504b81c87f3719aab14c3d764a32073af0b Mon Sep 17 00:00:00 2001 From: hns Date: Tue, 13 Jan 2004 17:19:16 +0000 Subject: [PATCH] Throw EvaluatorException in hasFunction() when a prototype contains a syntax error. --- src/helma/scripting/rhino/RhinoCore.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/helma/scripting/rhino/RhinoCore.java b/src/helma/scripting/rhino/RhinoCore.java index 04bc4329..76a087af 100644 --- a/src/helma/scripting/rhino/RhinoCore.java +++ b/src/helma/scripting/rhino/RhinoCore.java @@ -409,9 +409,10 @@ public final class RhinoCore { */ public boolean hasFunction(String protoname, String fname) { // System.err.println ("HAS_FUNC: "+fname); - try { - Scriptable op = getPrototype(protoname); + // throws EvaluatorException if type has a syntax error + Scriptable op = getValidPrototype(protoname); + try { // if this is an untyped object return false if (op == null) { return false;