From 9c915ed4c69758a5b7d165980dd790b713537664 Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Sun, 13 Sep 2015 00:44:33 +0300 Subject: [PATCH] Improve error logging in goracle --- modules/goraclebackend/soracle.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/goraclebackend/soracle.cc b/modules/goraclebackend/soracle.cc index 19e7aae934..c5142acea8 100644 --- a/modules/goraclebackend/soracle.cc +++ b/modules/goraclebackend/soracle.cc @@ -427,20 +427,20 @@ SOracle::SOracle(const string &database, int err = OCIHandleAlloc(d_environmentHandle, (dvoid**) &d_errorHandle, OCI_HTYPE_ERROR, 0, NULL); if (err) { - throw sPerrorException("OCIHandleAlloc(errorHandle)"); + throw sPerrorException("OCIHandleAlloc(errorHandle)" + string(": ") + getOracleError()); } err = OCILogon2(d_environmentHandle, d_errorHandle, &d_serviceContextHandle, (OraText*)user.c_str(), user.size(), (OraText*) password.c_str(), strlen(password.c_str()), (OraText*) database.c_str(), strlen(database.c_str()), OCI_LOGON2_STMTCACHE); // increase statement cache to 100 if (err) { - throw sPerrorException("OCILogon2"); + throw sPerrorException(string("OCILogon2") + string(": ") + getOracleError()); } ub4 cacheSize = 100; err = OCIAttrSet(d_serviceContextHandle, OCI_HTYPE_SVCCTX, &cacheSize, sizeof(ub4), OCI_ATTR_STMTCACHESIZE, d_errorHandle); if (err) { - throw sPerrorException("OCIAttrSet(stmtcachesize)"); + throw sPerrorException("OCIAttrSet(stmtcachesize): " + string(": ") + getOracleError()); } } -- 2.47.2