aboutsummaryrefslogtreecommitdiff
path: root/odb/exceptions.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-02-21 15:11:05 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-02-21 15:11:05 +0200
commit1233c11bf05cc3a039afa548faf06f3610f24269 (patch)
treefa0a2b394b4b788a5a08fad04fb2526c502be485 /odb/exceptions.cxx
parent02d943c11ab54e68c1ea6addd23c9852feecd94a (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.cxx')
-rw-r--r--odb/exceptions.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/odb/exceptions.cxx b/odb/exceptions.cxx
index 27a0e8b..1d4be70 100644
--- a/odb/exceptions.cxx
+++ b/odb/exceptions.cxx
@@ -55,6 +55,18 @@ namespace odb
return "transaction aborted due to deadlock";
}
+ const char* connection_lost::
+ what () const throw ()
+ {
+ return "connection to database lost";
+ }
+
+ const char* timeout::
+ what () const throw ()
+ {
+ return "database operation timeout";
+ }
+
const char* object_not_persistent::
what () const throw ()
{