aboutsummaryrefslogtreecommitdiff
path: root/odb/oracle/connection.hxx
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-11-29 14:45:51 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-11-30 11:32:07 +0200
commitc352bdb8b4ee7a636f71a71a301c181942af2d39 (patch)
tree5b7faa4d826a23162a59e241cb800a9f0f7e2db8 /odb/oracle/connection.hxx
parent3ed6a781cf4aad7986f805dc8a8e5c487d10a805 (diff)
Improve the Oracle translate_error implementation
The improved implementation scans all the records associated with an error handle. Furthermore, if it is established that the connection to the database has been lost, the connection is marked as such. Additionally, all special exceptions (deadlock, timeout, and connection_lost) are now supported.
Diffstat (limited to 'odb/oracle/connection.hxx')
-rw-r--r--odb/oracle/connection.hxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/odb/oracle/connection.hxx b/odb/oracle/connection.hxx
index b745b95..45444c1 100644
--- a/odb/oracle/connection.hxx
+++ b/odb/oracle/connection.hxx
@@ -82,6 +82,19 @@ namespace odb
using odb::connection::tracer;
public:
+ bool
+ failed () const
+ {
+ return failed_;
+ }
+
+ void
+ mark_failed ()
+ {
+ failed_ = true;
+ }
+
+ public:
OCISvcCtx*
handle ()
{
@@ -119,6 +132,7 @@ namespace odb
auto_handle<OCIError> error_;
auto_handle<OCISvcCtx> handle_;
+ bool failed_;
std::auto_ptr<statement_cache_type> statement_cache_;