# HG changeset patch # User Sebastien Jodogne # Date 1459946486 -7200 # Node ID c746e2d42ac89adafbf4b9f4257af4080b3bae5b # Parent b10a165e0e3636d95bce1746959589ccd00f18d0 extended error codes for SQLite diff -r b10a165e0e36 -r c746e2d42ac8 Core/SQLite/Connection.cpp --- a/Core/SQLite/Connection.cpp Wed Apr 06 14:36:56 2016 +0200 +++ b/Core/SQLite/Connection.cpp Wed Apr 06 14:41:26 2016 +0200 @@ -163,7 +163,8 @@ if (error == SQLITE_ERROR) { #if ORTHANC_SQLITE_STANDALONE != 1 - LOG(ERROR) << "SQLite execute error: " << sqlite3_errmsg(db_); + LOG(ERROR) << "SQLite execute error: " << sqlite3_errmsg(db_) + << " (" << sqlite3_extended_errcode(db_) << ")"; #endif throw OrthancSQLiteException(ErrorCode_SQLiteExecute); diff -r b10a165e0e36 -r c746e2d42ac8 Core/SQLite/StatementReference.cpp --- a/Core/SQLite/StatementReference.cpp Wed Apr 06 14:36:56 2016 +0200 +++ b/Core/SQLite/StatementReference.cpp Wed Apr 06 14:41:26 2016 +0200 @@ -82,7 +82,8 @@ if (error != SQLITE_OK) { #if ORTHANC_SQLITE_STANDALONE != 1 - LOG(ERROR) << "SQLite: " << sqlite3_errmsg(database); + LOG(ERROR) << "SQLite: " << sqlite3_errmsg(database) + << " (" << sqlite3_extended_errcode(database) << ")"; #endif throw OrthancSQLiteException(ErrorCode_SQLitePrepareStatement);