diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/script/api/qscriptvalue.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 2084ddb..c3c7c18 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -2131,8 +2131,10 @@ QScriptValue QScriptValue::construct(const QScriptValueList &args) JSC::ConstructData constructData; JSC::ConstructType constructType = callee.getConstructData(constructData); JSC::JSObject *result = JSC::construct(exec, callee, constructType, constructData, jscArgs); - if (exec->hadException()) + if (exec->hadException()) { eng_p->uncaughtException = exec->exception(); + result = JSC::asObject(exec->exception()); + } return eng_p->scriptValueFromJSCValue(result); } |