summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/qml/qmlengine.cpp14
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();