Disclaimer: I'm not good with exceptions
but i think you will need (to exclude the main return from the try block) something like this:
int main(int argc, char *argv[])
{
//...
int ret_val;
try {
ret_val = app.exec();
}
catch (...){
qDebug() << "Exception";
}
return ret_val;
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
//...
int ret_val;
try {
ret_val = app.exec();
}
catch (...){
qDebug() << "Exception";
}
return ret_val;
}
To copy to clipboard, switch view to plain text mode
But remember that Qt doesn't throw exceptions, you will catch only yours.
Bookmarks