Report error instead of aborting the application.
This commit is contained in:
parent
167f5b1386
commit
06a3e8bdcc
1 changed files with 14 additions and 4 deletions
|
|
@ -164,11 +164,21 @@ void QueryTool::execute()
|
|||
}
|
||||
};
|
||||
|
||||
try {
|
||||
if (m_queryParamListController->empty())
|
||||
m_dbConnection.send(cmd, cb);
|
||||
else
|
||||
m_dbConnection.send(cmd, m_queryParamListController->params(), cb);
|
||||
}
|
||||
catch (const std::exception &ex) {
|
||||
QMessageBox msgBox;
|
||||
msgBox.setIcon(QMessageBox::Critical);
|
||||
msgBox.setText(QString("Error executing query: %1").arg(QString::fromUtf8(ex.what())));
|
||||
msgBox.setStandardButtons(QMessageBox::Close);
|
||||
msgBox.setDefaultButton(QMessageBox::Close);
|
||||
msgBox.exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QueryTool::explain(bool analyze)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue