mirror of
https://github.com/allankoechke/SQLiteCpp.git
synced 2026-11-30 17:07:36 +00:00
Fix #73 Wrong exception thrown by Database constructor
- switched from sqlite3_errmsg() to sqlite3_errstr() where applicable
This commit is contained in:
@@ -85,11 +85,7 @@ int Backup::executeStep(const int aNumPage /* = -1 */)
|
||||
if (SQLITE_OK != res && SQLITE_DONE != res &&
|
||||
SQLITE_BUSY != res && SQLITE_LOCKED != res)
|
||||
{
|
||||
std::string strerr("Backup executeStep error");
|
||||
#if SQLITE_VERSION_NUMBER >= 3007015 // SQLite v3.7.15 is the first version with sqlite3_errstr() interface
|
||||
strerr += "with error message ";
|
||||
strerr += sqlite3_errstr(res);
|
||||
#endif
|
||||
std::string strerr = sqlite3_errstr(res);
|
||||
throw SQLite::Exception(strerr);
|
||||
}
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user