diff Core/SQLite/StatementReference.cpp @ 1958:c746e2d42ac8

extended error codes for SQLite
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 06 Apr 2016 14:41:26 +0200
parents b1291df2f780
children fa5ad4368fe3
line wrap: on
line diff
--- 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);