aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcomponent.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-10-22 14:32:03 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-29 10:39:04 +0100
commit25fbdfc66fa995bfe633b3c31d635045f7cf66dd (patch)
tree3264a851680476ebb7f161d5a38dcff3182a0e8a /src/qml/qml/qqmlcomponent.cpp
parentffcdbfa03f8bb36b521f8c1a703ee24085fe25bd (diff)
Fix the remaining try/catch statements in C++
Change-Id: I2421dc48fb271b66bd476fb16a32a88fcc4c5177 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcomponent.cpp')
-rw-r--r--src/qml/qml/qqmlcomponent.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index 01e87537f5..883237130b 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -1567,12 +1567,12 @@ void QmlIncubatorObject::statusChanged(QQmlIncubator::Status s)
QV4::ScopedFunctionObject f(scope, m_statusChanged);
if (f) {
QV4::ExecutionContext *ctx = scope.engine->current;
- try {
- QV4::ScopedCallData callData(scope, 1);
- callData->thisObject = this;
- callData->args[0] = QV4::Primitive::fromUInt32(s);
- f->call(callData);
- } catch (...) {
+ QV4::ScopedCallData callData(scope, 1);
+ callData->thisObject = this;
+ callData->args[0] = QV4::Primitive::fromUInt32(s);
+ f->call(callData);
+ if (scope.hasException()) {
+ ctx->catchException();
QQmlError error = QV4::ExecutionEngine::catchExceptionAsQmlError(ctx);
QQmlEnginePrivate::warning(QQmlEnginePrivate::get(v8->engine()), error);
}