Here's my code snippet:
try
{
if ( query.exec(query_str) == false ) {
err_desc = query.lastError().text().toStdString();
return RET_FAIL;
}
}
catch(QSqlError &e)
{
handleError(e);
}
I set a breakpoint inside handleError, but it seems this breakpoint was never reached when there is an error, with err_desc
the following value:
MySQL server has gone away QMYSQL: unable to execute query
Why does it fail to catch the error ?