aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/exceptions.cxx6
-rw-r--r--odb/exceptions.hxx7
2 files changed, 13 insertions, 0 deletions
diff --git a/odb/exceptions.cxx b/odb/exceptions.cxx
index 9089a5b..b200843 100644
--- a/odb/exceptions.cxx
+++ b/odb/exceptions.cxx
@@ -46,6 +46,12 @@ namespace odb
return "session not in effect in this thread";
}
+ const char* session_required::
+ what () const throw ()
+ {
+ return "session required to load this object relationship";
+ }
+
const char* deadlock::
what () const throw ()
{
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;