diff options
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index 116e449..b5ba4ff 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -661,10 +661,9 @@ JSC::JSValue functionPrint(JSC::ExecState* exec, JSC::JSObject*, JSC::JSValue, c break; result.append(s); } - if (!exec->hadException()) { - qDebug(qPrintable(result)); + if (exec->hadException()) return exec->exception(); - } + qDebug(qPrintable(result)); return JSC::jsUndefined(); } |