mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-20 06:49:56 +00:00
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
This commit is contained in:
parent
c9744fec96
commit
c1b5490f9f
@ -52,6 +52,8 @@
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <exception>
|
||||
|
||||
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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user