From c1b5490f9faca75c2cfcf63587408e8d4c8fef89 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 2 Apr 2007 10:18:12 +0000 Subject: [PATCH] Implement Angus suggestion. * GuiApplication::notify(): try to catch 'normal' exception first. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17696 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiApplication.C | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/frontends/qt4/GuiApplication.C b/src/frontends/qt4/GuiApplication.C index 785805f446..b0f149774e 100644 --- a/src/frontends/qt4/GuiApplication.C +++ b/src/frontends/qt4/GuiApplication.C @@ -52,6 +52,8 @@ #include +#include + using std::string; using std::endl; @@ -220,10 +222,13 @@ bool GuiApplication::notify(QObject * receiver, QEvent * event) try { return_value = QApplication::notify(receiver, event); } + catch (std::exception const & e) { + lyxerr << "Caught \"normal\" exception: " << e.what() << endl; + LyX::cref().emergencyCleanup(); + abort(); + } catch (...) { - lyxerr << "ERROR: Exception caught in the Qt event loop, exiting..." - << endl; - + lyxerr << "Caught some really weird exception..." << endl; LyX::cref().emergencyCleanup(); abort(); } -- 2.39.5