Throw EvaluatorException in hasFunction() when a prototype

contains a syntax error.
This commit is contained in:
hns 2004-01-13 17:19:16 +00:00
parent fab69599fe
commit 8d9c6504b8

View file

@ -409,9 +409,10 @@ public final class RhinoCore {
*/ */
public boolean hasFunction(String protoname, String fname) { public boolean hasFunction(String protoname, String fname) {
// System.err.println ("HAS_FUNC: "+fname); // System.err.println ("HAS_FUNC: "+fname);
try { // throws EvaluatorException if type has a syntax error
Scriptable op = getPrototype(protoname); Scriptable op = getValidPrototype(protoname);
try {
// if this is an untyped object return false // if this is an untyped object return false
if (op == null) { if (op == null) {
return false; return false;