aboutsummaryrefslogtreecommitdiff
path: root/odb/sqlite/exceptions.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2013-03-18 14:13:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2013-03-18 14:13:37 +0200
commit43904af47c138feea6a5c6e04756c70bb2e41de7 (patch)
tree8445e04cf5d7afa222d68704530a72a48f86a7ba /odb/sqlite/exceptions.hxx
parentb580f1548ff335a0e1fa004fc6626486535c94e1 (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,