If scripted constructor function causes an exception, let it pass through

(i.e. rethrow it).
This commit is contained in:
hns 2003-01-28 13:09:16 +00:00
parent 55dd6f9cd0
commit 0e03e7a542

View file

@ -54,11 +54,17 @@ public class NodeConstructor extends BuiltinFunctionObject {
// with the name of the type.
// HACK: There is an incompatibility problem here, because the property
// constructor is defined as the constructor of the object by EcmaScript.
if (op.getProperty ("constructor", "constructor".hashCode()) instanceof ConstructedFunctionObject)
if (op.getProperty ("constructor",
"constructor".hashCode())
instanceof ConstructedFunctionObject)
node.doIndirectCall (engine.getEvaluator(), node, "constructor", arguments);
else
else if (op.getProperty (typename,
typename.hashCode())
instanceof ConstructedFunctionObject)
node.doIndirectCall (engine.getEvaluator(), node, typename, arguments);
} catch (Exception ignore) {}
} catch (Exception x) {
throw new EcmaScriptException (x.toString());
}
}
return node;
}