journaldb: Assert in case of SQL error

relates issue #2106
This commit is contained in:
Olivier Goffart 2014-09-15 14:27:39 +02:00
parent 20dd3b0a69
commit 97cc05eeea

View File

@ -80,8 +80,14 @@ void SyncJournalDb::commitTransaction()
bool SyncJournalDb::sqlFail( const QString& log, const QSqlQuery& query )
{
commitTransaction();
qWarning() << "Error" << log << query.lastError().text();
#ifdef NDEBUG
qWarning()
#else
qFatal()
#endif
<< "SQL Error" << log << query.lastError().text();
_db.close();
return false;
}