aboutsummaryrefslogtreecommitdiff
path: root/odb/exceptions.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-03-06 11:34:56 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-03-06 11:34:56 +0200
commitc2be6303f97e470960ee77805128c46d3ea5c102 (patch)
treef45e58c26c88d28fca9a2747fc4e4d4cdb4e0364 /odb/exceptions.hxx
parent3e34265af868388acde7ab2c198bf9f82775eba4 (diff)
Detect situations where session is required but not used
Throw session_required.
Diffstat (limited to 'odb/exceptions.hxx')
-rw-r--r--odb/exceptions.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/odb/exceptions.hxx b/odb/exceptions.hxx
index 682766a..b55b2a4 100644
--- a/odb/exceptions.hxx
+++ b/odb/exceptions.hxx
@@ -55,6 +55,12 @@ namespace odb
what () const throw ();
};
+ struct LIBODB_EXPORT session_required: exception
+ {
+ virtual const char*
+ what () const throw ();
+ };
+
// Database operations exceptions.
//
struct LIBODB_EXPORT recoverable: exception
@@ -138,6 +144,7 @@ namespace odb
using odb::already_in_session;
using odb::not_in_session;
+ using odb::session_required;
using odb::recoverable;
using odb::deadlock;