diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-02-21 15:11:05 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-02-21 15:11:05 +0200 |
commit | 1233c11bf05cc3a039afa548faf06f3610f24269 (patch) | |
tree | fa0a2b394b4b788a5a08fad04fb2526c502be485 /odb/exceptions.hxx | |
parent | 02d943c11ab54e68c1ea6addd23c9852feecd94a (diff) |
Add recoverable, connection_lost, and timeout exceptions
The deadlock exception now inherits from recoverable. New manual section:
3.5, "Error Handling and Recovery".
Diffstat (limited to 'odb/exceptions.hxx')
-rw-r--r-- | odb/exceptions.hxx | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/odb/exceptions.hxx b/odb/exceptions.hxx index 362c7b0..1185876 100644 --- a/odb/exceptions.hxx +++ b/odb/exceptions.hxx @@ -62,7 +62,23 @@ namespace odb // Database operations exceptions. // - struct LIBODB_EXPORT deadlock: exception + struct LIBODB_EXPORT recoverable: exception + { + }; + + struct LIBODB_EXPORT connection_lost: recoverable + { + virtual const char* + what () const throw (); + }; + + struct LIBODB_EXPORT timeout: recoverable + { + virtual const char* + what () const throw (); + }; + + struct LIBODB_EXPORT deadlock: recoverable { virtual const char* what () const throw (); @@ -102,7 +118,10 @@ namespace odb using odb::not_in_session; using odb::const_object; + using odb::recoverable; using odb::deadlock; + using odb::connection_lost; + using odb::timeout; using odb::object_not_persistent; using odb::object_already_persistent; using odb::result_not_cached; |