From 3fb92c470f67162617704ad897cf90f73a18ac00 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 18 Mar 2013 14:17:42 +0200 Subject: Add separate exception for SQLite forced rollbacks --- odb/sqlite/exceptions.hxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'odb/sqlite/exceptions.hxx') 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, -- cgit v1.1