aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsapi/qjsvalueiterator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsapi/qjsvalueiterator.cpp')
-rw-r--r--src/qml/jsapi/qjsvalueiterator.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/qml/jsapi/qjsvalueiterator.cpp b/src/qml/jsapi/qjsvalueiterator.cpp
index dcf7c4755b..245b75b384 100644
--- a/src/qml/jsapi/qjsvalueiterator.cpp
+++ b/src/qml/jsapi/qjsvalueiterator.cpp
@@ -199,21 +199,20 @@ QJSValue QJSValueIterator::value() const
QV4::ScopedObject o(scope, it->it.object);
QV4::ExecutionContext *ctx = engine->current;
- try {
- QV4::ScopedValue v(scope);
- if (!!d_ptr->currentName) {
- QV4::ScopedString n(scope, d_ptr->currentName);
- v = o->get(n);
- } else if (d_ptr->currentIndex != UINT_MAX) {
- v = o->getIndexed(d_ptr->currentIndex);
- } else {
- return QJSValue();
- }
- return new QJSValuePrivate(engine, v);
- } catch (...) {
+ QV4::ScopedValue v(scope);
+ if (!!d_ptr->currentName) {
+ QV4::ScopedString n(scope, d_ptr->currentName);
+ v = o->get(n);
+ } else if (d_ptr->currentIndex != UINT_MAX) {
+ v = o->getIndexed(d_ptr->currentIndex);
+ } else {
+ return QJSValue();
+ }
+ if (scope.hasException()) {
ctx->catchException();
return QJSValue();
}
+ return new QJSValuePrivate(engine, v);
}