From 1233c11bf05cc3a039afa548faf06f3610f24269 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 21 Feb 2011 15:11:05 +0200 Subject: Add recoverable, connection_lost, and timeout exceptions The deadlock exception now inherits from recoverable. New manual section: 3.5, "Error Handling and Recovery". --- odb/exceptions.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'odb/exceptions.cxx') 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 () { -- cgit v1.1