Commit f2b2f4bc authored by Maciej Sobczak's avatar Maciej Sobczak

Added more error codes for error categories in Oracle.

parent cd26169e
......@@ -48,6 +48,7 @@ public:
no_privilege,
no_data,
constraint_violation,
unknown_transaction_state,
system_error,
unknown
};
......
......@@ -22,7 +22,7 @@ using namespace soci::details::oracle;
oracle_soci_error::oracle_soci_error(std::string const & msg, int errNum)
: soci_error(msg), err_num_(errNum), cat_(unknown)
{
if (errNum == 12162)
if (errNum == 12162 || errNum == 25403)
{
cat_ = connection_error;
}
......@@ -30,6 +30,19 @@ oracle_soci_error::oracle_soci_error(std::string const & msg, int errNum)
{
cat_ = constraint_violation;
}
else if (errNum == 1466 ||
errNum == 2055 ||
errNum == 2067 ||
errNum == 2091 ||
errNum == 2092 ||
errNum == 25401 ||
errNum == 25402 ||
errNum == 25405 ||
errNum == 25408 ||
errNum == 25409)
{
cat_ = unknown_transaction_state;
}
}
void soci::details::oracle::get_error_details(sword res, OCIError *errhp,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment