aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/exceptions.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-03-18 14:17:42 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-03-18 14:18:26 +0200
commit3fb92c470f67162617704ad897cf90f73a18ac00 (patch)
tree5da4028fc38c96f97b2011b207ffd835d75d622f /odb/sqlite/exceptions.hxx
parent7e88b0a80618848d3a3c5f6cad886c8b7785787d (diff)
Add separate exception for SQLite forced rollbacks
Diffstat (limited to 'odb/sqlite/exceptions.hxx')
-rw-r--r--odb/sqlite/exceptions.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/odb/sqlite/exceptions.hxx b/odb/sqlite/exceptions.hxx
index 5afcdf5..be13bbe 100644
--- a/odb/sqlite/exceptions.hxx
+++ b/odb/sqlite/exceptions.hxx
@@ -19,6 +19,18 @@ namespace odb
{
namespace sqlite
{
+ // This exception is thrown if SQLite is forcing the current transaction
+ // to rollback. This can happen in SQLite 3.7.11 or later if one of the
+ // connections participating in the shared cache rolls back a transaction.
+ // See the SQLITE_ABORT_ROLLBACK extended error code for detail on this
+ // behavior.
+ //
+ struct LIBODB_EXPORT forced_rollback: recoverable
+ {
+ virtual const char*
+ what () const throw ();
+ };
+
struct LIBODB_SQLITE_EXPORT database_exception: odb::database_exception
{
database_exception (int error,