diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-28 03:59:33 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-28 03:59:33 (GMT) |
commit | eaab2a271f0d73d5a413902169efe32741208c42 (patch) | |
tree | da00990537be1d2546bbb84d3aac986eccf3dd30 /src/declarative/qml/qmlcontext.cpp | |
parent | 5f9091771eaa26db5ad35e4788c13ac011512b61 (diff) | |
download | Qt-eaab2a271f0d73d5a413902169efe32741208c42.zip Qt-eaab2a271f0d73d5a413902169efe32741208c42.tar.gz Qt-eaab2a271f0d73d5a413902169efe32741208c42.tar.bz2 |
Add a QmlExpression::error() method
QmlExpression should not print errors itself. This is the responsibility
of the caller.
Diffstat (limited to 'src/declarative/qml/qmlcontext.cpp')
-rw-r--r-- | src/declarative/qml/qmlcontext.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlcontext.cpp b/src/declarative/qml/qmlcontext.cpp index 2ebdf10..5032ff4 100644 --- a/src/declarative/qml/qmlcontext.cpp +++ b/src/declarative/qml/qmlcontext.cpp @@ -77,8 +77,11 @@ void QmlContextPrivate::addScript(const QString &script, QObject *scopeObject, QScriptValue val = scriptEngine->evaluate(script, fileName, lineNumber); - if (scriptEngine->hasUncaughtException()) - QmlExpressionPrivate::printException(scriptEngine); + if (scriptEngine->hasUncaughtException()) { + QmlError error; + QmlExpressionPrivate::exceptionToError(scriptEngine, error); + qWarning().nospace() << qPrintable(error.toString()); + } scriptEngine->popContext(); |