comparison 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
comparison
equal deleted inserted replaced
1957:b10a165e0e36 1958:c746e2d42ac8
80 80
81 int error = sqlite3_prepare_v2(database, sql, -1, &statement_, NULL); 81 int error = sqlite3_prepare_v2(database, sql, -1, &statement_, NULL);
82 if (error != SQLITE_OK) 82 if (error != SQLITE_OK)
83 { 83 {
84 #if ORTHANC_SQLITE_STANDALONE != 1 84 #if ORTHANC_SQLITE_STANDALONE != 1
85 LOG(ERROR) << "SQLite: " << sqlite3_errmsg(database); 85 LOG(ERROR) << "SQLite: " << sqlite3_errmsg(database)
86 << " (" << sqlite3_extended_errcode(database) << ")";
86 #endif 87 #endif
87 88
88 throw OrthancSQLiteException(ErrorCode_SQLitePrepareStatement); 89 throw OrthancSQLiteException(ErrorCode_SQLitePrepareStatement);
89 } 90 }
90 91