From d832cf926d1ca180c4d691b09293e4f528e5e1bc 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/mysql/error.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/odb/mysql/error.cxx b/odb/mysql/error.cxx index 94a41b2..4700d12 100644 --- a/odb/mysql/error.cxx +++ b/odb/mysql/error.cxx @@ -33,10 +33,12 @@ namespace odb } case CR_SERVER_LOST: case CR_SERVER_GONE_ERROR: + { + c.mark_failed (); + throw connection_lost (); + } case CR_UNKNOWN_ERROR: { - // This connection is no longer usable. - // c.mark_failed (); // Fall through. } -- cgit v1.1