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) {
// 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;