Throw EvaluatorException in hasFunction() when a prototype
contains a syntax error.
This commit is contained in:
parent
fab69599fe
commit
8d9c6504b8
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue