aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4value.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-11-12 13:55:55 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-11-15 13:16:28 +0100
commit3dc7b5ddf6de5d9d000f443170d9a33e3d32bda3 (patch)
treebdf725cac352f9d83a6b8d7a4308c867ef2e20e0 /src/qml/jsruntime/qv4value.cpp
parentcd6db04169dcd0f7b49f5875d3c63d94fa32e17a (diff)
Cleanup exception catching code
Change-Id: I85afd5758f72e19c280dc196601ee145f0c25f01 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4value.cpp')
-rw-r--r--src/qml/jsruntime/qv4value.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4value.cpp b/src/qml/jsruntime/qv4value.cpp
index 3d40f4b7f5..cd44d93f42 100644
--- a/src/qml/jsruntime/qv4value.cpp
+++ b/src/qml/jsruntime/qv4value.cpp
@@ -130,7 +130,7 @@ QString Value::toQStringNoThrow() const
bool caughtException = false;
ScopedValue prim(scope, RuntimeHelpers::toPrimitive(ValueRef::fromRawValue(this), STRING_HINT));
if (scope.hasException()) {
- ex = ctx->catchException();
+ ex = scope.engine->catchException();
caughtException = true;
} else if (prim->isPrimitive()) {
return prim->toQStringNoThrow();
@@ -139,7 +139,7 @@ QString Value::toQStringNoThrow() const
if (caughtException) {
ScopedValue prim(scope, RuntimeHelpers::toPrimitive(ex, STRING_HINT));
if (scope.hasException()) {
- ex = ctx->catchException();
+ ex = scope.engine->catchException();
} else if (prim->isPrimitive()) {
return prim->toQStringNoThrow();
}