aboutsummaryrefslogtreecommitdiff
path: root/odb/oracle/error.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-08-14 09:37:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-11-25 06:45:34 +0200
commitb39e670403bfdff6870d9b9c7b075230e84c27cf (patch)
treedd7a8ee8cd96b0543a629e5db73680050a317e1c /odb/oracle/error.cxx
parent40052e8f41978087836d04a37d1dd86552e16b7b (diff)
Implement bulk database operation support for Oracle and SQL Server
Diffstat (limited to 'odb/oracle/error.cxx')
-rw-r--r--odb/oracle/error.cxx21
1 files changed, 15 insertions, 6 deletions
diff --git a/odb/oracle/error.cxx b/odb/oracle/error.cxx
index afab2c7..68bdc44 100644
--- a/odb/oracle/error.cxx
+++ b/odb/oracle/error.cxx
@@ -19,7 +19,8 @@ namespace odb
namespace oracle
{
static void
- translate_error (void* h, ub4 htype, sword r, connection* conn)
+ translate_error (void* h, ub4 htype, sword r, connection* conn,
+ size_t pos, multiple_exceptions* mex)
{
assert (r != OCI_SUCCESS && r != OCI_SUCCESS_WITH_INFO);
@@ -186,25 +187,33 @@ namespace odb
dbe.append (e, b);
}
- throw dbe;
+ if (mex == 0)
+ throw dbe;
+ else
+ // It could be that some of these errors are fatal. I guess we
+ // will just have to learn from experience which ones are. The
+ // client code can always treat specific error codes as fatal.
+ //
+ mex->insert (pos, dbe);
}
void
- translate_error (OCIError* h, sword r)
+ translate_error (OCIError* h, sword r, connection* c,
+ size_t pos, multiple_exceptions* mex)
{
- translate_error (h, OCI_HTYPE_ERROR, r, 0);
+ translate_error (h, OCI_HTYPE_ERROR, r, c, pos, mex);
}
void
translate_error (connection& c, sword r)
{
- translate_error (c.error_handle (), OCI_HTYPE_ERROR, r, &c);
+ translate_error (c.error_handle (), OCI_HTYPE_ERROR, r, &c, 0, 0);
}
void
translate_error (OCIEnv* h)
{
- translate_error (h, OCI_HTYPE_ENV, OCI_ERROR, 0);
+ translate_error (h, OCI_HTYPE_ENV, OCI_ERROR, 0, 0, 0);
}
}
}