mirror of
https://github.com/SOCI/soci.git
synced 2026-05-01 16:49:27 -05:00
Throw a mysql exception
It a mysql error or exception, just throw as it is.
This commit is contained in:
@@ -368,7 +368,11 @@ void hard_exec(MYSQL *conn, const string & query)
|
||||
if (0 != mysql_real_query(conn, query.c_str(),
|
||||
static_cast<unsigned long>(query.size())))
|
||||
{
|
||||
throw soci_error(mysql_error(conn));
|
||||
//throw soci_error(mysql_error(conn));
|
||||
string errMsg = mysql_error(conn);
|
||||
unsigned int errNum = mysql_errno(conn);
|
||||
throw mysql_soci_error(errMsg, errNum);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user