summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlsqldatabase.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-12-15 05:33:01 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-12-15 05:33:49 (GMT)
commit2f8015b66528561dd9219842fd334956876ee85f (patch)
tree73296c8b08f56ca3f238b03ca981828f2a9929df /src/declarative/qml/qmlsqldatabase.cpp
parent8d6030c2d0afeb5e4026a1ee3d6305feb4babd0f (diff)
downloadQt-2f8015b66528561dd9219842fd334956876ee85f.zip
Qt-2f8015b66528561dd9219842fd334956876ee85f.tar.gz
Qt-2f8015b66528561dd9219842fd334956876ee85f.tar.bz2
Print exceptions generated in SQL callback functions.
Diffstat (limited to 'src/declarative/qml/qmlsqldatabase.cpp')
-rw-r--r--src/declarative/qml/qmlsqldatabase.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlsqldatabase.cpp b/src/declarative/qml/qmlsqldatabase.cpp
index c3c3ca3..4fa63cb 100644
--- a/src/declarative/qml/qmlsqldatabase.cpp
+++ b/src/declarative/qml/qmlsqldatabase.cpp
@@ -44,7 +44,7 @@
#include "qmlengine.h"
#include "qmlengine_p.h"
#include "qmlrefcount_p.h"
-#include "qmlengine_p.h"
+#include "qmlexpression_p.h"
#include <QtCore/qobject.h>
#include <QtScript/qscriptvalue.h>
@@ -319,6 +319,10 @@ static QScriptValue qmlsqldatabase_transaction_shared(QScriptContext *context, Q
instance.setProperty(QLatin1String("executeSql"),
engine->newFunction(qmlsqldatabase_executeSql_outsidetransaction));
if (engine->hasUncaughtException()) {
+ QmlError error;
+ QmlExpressionPrivate::exceptionToError(engine, error);
+ qWarning() << error;
+ engine->clearExceptions();
db.rollback();
} else {
if (!db.commit())