[Pkg-owncloud-commits] [owncloud-client] 221/484: OwnSQL: add asserts in case of error that should not happen

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:45 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 3993a7f636f0a06b71eb3cc97cdb7a9818c02221
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Fri Oct 30 14:05:58 2015 +0100

    OwnSQL: add asserts in case of error that should not happen
---
 src/libsync/ownsql.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/libsync/ownsql.cpp b/src/libsync/ownsql.cpp
index 0f2c592..26d8bb5 100644
--- 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;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list