1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #ifndef EASYQTSQL_DBEXCEPTION_H
- #define EASYQTSQL_DBEXCEPTION_H
- #ifndef EASY_QT_SQL_MAIN
- #include <QtSql>
- #endif
- class DBException : public QException
- {
- friend class Database;
- friend class Transaction;
- friend class PreparedQuery;
- friend class InsertQuery;
- friend class UpdateQuery;
- friend class DeleteQuery;
- public:
- const QSqlError lastError;
- const QString lastQuery;
- private:
- explicit DBException (const QSqlQuery &q)
- : lastError(q.lastError())
- , lastQuery(q.lastQuery())
- { }
- explicit DBException (const QSqlDatabase &db)
- : lastError(db.lastError())
- { }
- };
- #endif // EASYQTSQL_DBEXCEPTION_H
|