diff options
author | mae <qt-info@nokia.com> | 2009-04-21 09:58:26 (GMT) |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-04-24 08:05:48 (GMT) |
commit | a44ae02e0e5b7949ad4643caf52fd04f56166b13 (patch) | |
tree | 36bc3abece2f8c54812c0e41fa25bb131b6c1d3b /src/declarative/qml | |
parent | 1a382dc05c7fc69ded1313abd034492edc6b69ee (diff) | |
download | Qt-a44ae02e0e5b7949ad4643caf52fd04f56166b13.zip Qt-a44ae02e0e5b7949ad4643caf52fd04f56166b13.tar.gz Qt-a44ae02e0e5b7949ad4643caf52fd04f56166b13.tar.bz2 |
error output for scripts
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qmlengine.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index 5cbd02b..943d812 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -832,6 +832,20 @@ QVariant QmlExpression::value() scriptEngine->currentContext()->pushScope(context()->d_func()->scopeChain.at(i)); } QScriptValue svalue = scriptEngine->evaluate(expression()); + if (scriptEngine->hasUncaughtException()) { + if (scriptEngine->uncaughtException().isError()){ + QScriptValue exception = scriptEngine->uncaughtException(); + if(!exception.property(QLatin1String("fileName")).toString().isEmpty()){ + qWarning() << exception.property(QLatin1String("fileName")).toString() + << scriptEngine->uncaughtExceptionLineNumber() + << exception.toString(); + + } else { + qWarning() << exception.toString(); + } + } + } + context()->d_func()->defaultObjects.removeAt(context()->d_func()->highPriorityCount); if(svalue.isArray()) { int length = svalue.property(QLatin1String("length")).toInt32(); |