mirror of
https://github.com/allankoechke/SQLiteCpp.git
synced 2026-12-01 09:08:47 +00:00
Fix issue #7 : SQLITECPP_ENABLE_ASSERT_HANDLER
- SQLITECPP_ASSERT() can call a user defined SQLite::assertion_failed() handler.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "Transaction.h"
|
||||
|
||||
#include "Database.h"
|
||||
#include "Assert.h"
|
||||
#include "Exception.h"
|
||||
|
||||
|
||||
@@ -35,11 +36,10 @@ Transaction::~Transaction(void) throw() // nothrow
|
||||
{
|
||||
mDatabase.exec("ROLLBACK");
|
||||
}
|
||||
catch (SQLite::Exception& /*e*/)
|
||||
catch (SQLite::Exception& e)
|
||||
{
|
||||
// Never throw an exception in a destructor
|
||||
//std::cout << e.what() << std::endl;
|
||||
SQLITE_CPP_ASSERT(false);
|
||||
SQLITECPP_ASSERT(false, e.what()); // See SQLITECPP_ENABLE_ASSERT_HANDLER
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user