aboutsummaryrefslogtreecommitdiff
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
commitd832cf926d1ca180c4d691b09293e4f528e5e1bc (patch)
tree8ce8b93ed35aef9e0af4cd20e0fe2a7082970985
parent9155251867692cb212c26fd5380abc0815c2f44b (diff)
Add recoverable, connection_lost, and timeout exceptions
The deadlock exception now inherits from recoverable. New manual section: 3.5, "Error Handling and Recovery".
-rw-r--r--odb/mysql/error.cxx6
1 files 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.
}