diff options
Diffstat (limited to 'gui/application.cc')
-rw-r--r-- | gui/application.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gui/application.cc b/gui/application.cc index eaabeefb..58dc23eb 100644 --- a/gui/application.cc +++ b/gui/application.cc @@ -22,6 +22,7 @@ #include "application.h" #include <QMessageBox> #include <QSurfaceFormat> +#include <QTextStream> #include <exception> NEXTPNR_NAMESPACE_BEGIN @@ -38,6 +39,12 @@ bool Application::notify(QObject *receiver, QEvent *event) bool retVal = true; try { retVal = QApplication::notify(receiver, event); + } catch (assertion_failure ex) { + QString msg; + QTextStream out(&msg); + out << ex.filename.c_str() << " at " << ex.line << "\n"; + out << ex.msg.c_str(); + QMessageBox::critical(0, "Error", msg); } catch (...) { QMessageBox::critical(0, "Error", "Fatal error !!!"); } |