diff options
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r-- | src/qml/jsruntime/qv4debugging.cpp | 10 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4debugging_p.h | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4debugging.cpp b/src/qml/jsruntime/qv4debugging.cpp index ceeef80b9f..6efc3793ce 100644 --- a/src/qml/jsruntime/qv4debugging.cpp +++ b/src/qml/jsruntime/qv4debugging.cpp @@ -59,6 +59,7 @@ Debugger::JavaScriptJob::JavaScriptJob(QV4::ExecutionEngine *engine, int frameNr : engine(engine) , frameNr(frameNr) , script(script) + , resultIsException(false) {} void Debugger::JavaScriptJob::run() @@ -85,11 +86,18 @@ void Debugger::JavaScriptJob::run() QV4::ScopedValue result(scope); if (!scope.engine->hasException) result = script.run(); - if (scope.engine->hasException) + if (scope.engine->hasException) { result = scope.engine->catchException(); + resultIsException = true; + } handleResult(result); } +bool Debugger::JavaScriptJob::hasExeption() const +{ + return resultIsException; +} + class EvalJob: public Debugger::JavaScriptJob { bool result; diff --git a/src/qml/jsruntime/qv4debugging_p.h b/src/qml/jsruntime/qv4debugging_p.h index ac0c934d42..86faba45f7 100644 --- a/src/qml/jsruntime/qv4debugging_p.h +++ b/src/qml/jsruntime/qv4debugging_p.h @@ -95,10 +95,12 @@ public: QV4::ExecutionEngine *engine; int frameNr; const QString &script; + bool resultIsException; public: JavaScriptJob(QV4::ExecutionEngine *engine, int frameNr, const QString &script); void run(); + bool hasExeption() const; protected: virtual void handleResult(QV4::ScopedValue &result) = 0; |