mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 17:56:13 -04:00
Revert use sqlite_errstr instead of sqlite3_errmsg that fixed #48
- sqlite3_errstr() is new from SQLite v3.7.15, not supported on Ubuntu 12.04 which is what is used for continuous integration with Travis CI - Only case of error is SQLITE_BUSY: "database is locked" (some statements are not finalized) so use this generic string instead
This commit is contained in:
parent
3ffc07b1c2
commit
318f742b5c
@ -73,8 +73,9 @@ Database::Database(const std::string& aFilename,
|
||||
Database::~Database() noexcept // nothrow
|
||||
{
|
||||
const int ret = sqlite3_close(mpSQLite);
|
||||
// Never throw an exception in a destructor
|
||||
SQLITECPP_ASSERT(SQLITE_OK == ret, sqlite3_errstr(ret)); // See SQLITECPP_ENABLE_ASSERT_HANDLER
|
||||
// Only case of error is SQLITE_BUSY: "database is locked" (some statements are not finalized)
|
||||
// Never throw an exception in a destructor :
|
||||
SQLITECPP_ASSERT(SQLITE_OK == ret, "database is locked"); // See SQLITECPP_ENABLE_ASSERT_HANDLER
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user