summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qmlengine.cpp')
-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 ad4a627..5e698c2 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -917,6 +917,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();