projects
/
nextcloud-desktop.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aaf16ff
)
OwnSQL: add asserts in case of error that should not happen
author
Olivier Goffart
<ogoffart@woboq.com>
Fri, 30 Oct 2015 13:05:58 +0000
(14:05 +0100)
committer
Olivier Goffart
<ogoffart@woboq.com>
Fri, 30 Oct 2015 13:05:58 +0000
(14:05 +0100)
src/libsync/ownsql.cpp
patch
|
blob
|
history
diff --git
a/src/libsync/ownsql.cpp
b/src/libsync/ownsql.cpp
index 0f2c5927557ced6083442210f9a39f6e88cd5151..26d8bb5e5a8961e35195ff0dfb9013a1a87f7fa6 100644
(file)
--- a/
src/libsync/ownsql.cpp
+++ b/
src/libsync/ownsql.cpp
@@
-138,6
+138,7
@@
void SqlDatabase::close()
SQLITE_DO(sqlite3_close(_db) );
if (_errId != SQLITE_OK) {
qWarning() << "ERROR When closing DB" << _error;
+ Q_ASSERT(!"SQLite Close Error");
}
_db = 0;
}
@@
-211,6
+212,7
@@
int SqlQuery::prepare( const QString& sql)
if( _errId != SQLITE_OK ) {
_error = QString::fromUtf8(sqlite3_errmsg(_db));
qWarning() << "Sqlite prepare statement error:" << _error << "in" <<_sql;
+ Q_ASSERT(!"SQLITE Prepare error");
}
}
return _errId;