Skip to content
Permalink
Browse files

Use qCritical() for uncaught exceptions, allows backtrace to be dumpe…

…d when these are encountered
  • Loading branch information
nyalldawson committed Sep 22, 2020
1 parent 950d2bd commit 9d885af1840af775bdd927a827a4d12459d82363
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/qgsapplication.cpp
@@ -448,19 +448,19 @@ bool QgsApplication::notify( QObject *receiver, QEvent *event )
}
catch ( QgsException &e )
{
QgsDebugMsg( "Caught unhandled QgsException: " + e.what() );
qCritical() << "Caught unhandled QgsException: " << e.what();
if ( qApp->thread() == QThread::currentThread() )
QMessageBox::critical( activeWindow(), tr( "Exception" ), e.what() );
}
catch ( std::exception &e )
{
QgsDebugMsg( "Caught unhandled std::exception: " + QString::fromLatin1( e.what() ) );
qCritical() << "Caught unhandled std::exception: " << e.what();
if ( qApp->thread() == QThread::currentThread() )
QMessageBox::critical( activeWindow(), tr( "Exception" ), e.what() );
}
catch ( ... )
{
QgsDebugMsg( QStringLiteral( "Caught unhandled unknown exception" ) );
qCritical() << "Caught unhandled unknown exception";
if ( qApp->thread() == QThread::currentThread() )
QMessageBox::critical( activeWindow(), tr( "Exception" ), tr( "unknown exception" ) );
}

0 comments on commit 9d885af

Please sign in to comment.
You can’t perform that action at this time.