diff Exception/SQLException.cpp @ 31:bf3dce7fedcb

Remove all references to QDebug
author Tom Fredrik Blenning Klaussen <bfg@blenning.no>
date Thu, 06 Sep 2012 19:14:58 +0200
parents
children f711ddb56ae7
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Exception/SQLException.cpp	Thu Sep 06 19:14:58 2012 +0200
@@ -0,0 +1,13 @@
+#include "SQLException.hpp"
+
+#include <QtSql/QSqlQuery>
+#include <QtSql/QSqlError>
+
+SQLException::SQLException(const QString& errorMsg) : Exception(errorMsg)
+{
+}
+
+SQLException::SQLException(const QSqlQuery& errorQuery) :
+  Exception(errorQuery.lastError().text() + ":" + errorQuery.lastQuery())
+{
+}