Unverified Commit 8b00c6bd authored by Mateusz Łoskot's avatar Mateusz Łoskot Committed by GitHub

Merge pull request #613 from seiyap70/patch-1

Throw a mysql exception
parents 79e222e3 0cbc9f33
......@@ -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);
}
}
......
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