mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +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 <boost/bind.hpp>
|
||||||
|
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
using std::endl;
|
using std::endl;
|
||||||
|
|
||||||
@ -220,10 +222,13 @@ bool GuiApplication::notify(QObject * receiver, QEvent * event)
|
|||||||
try {
|
try {
|
||||||
return_value = QApplication::notify(receiver, event);
|
return_value = QApplication::notify(receiver, event);
|
||||||
}
|
}
|
||||||
|
catch (std::exception const & e) {
|
||||||
|
lyxerr << "Caught \"normal\" exception: " << e.what() << endl;
|
||||||
|
LyX::cref().emergencyCleanup();
|
||||||
|
abort();
|
||||||
|
}
|
||||||
catch (...) {
|
catch (...) {
|
||||||
lyxerr << "ERROR: Exception caught in the Qt event loop, exiting..."
|
lyxerr << "Caught some really weird exception..." << endl;
|
||||||
<< endl;
|
|
||||||
|
|
||||||
LyX::cref().emergencyCleanup();
|
LyX::cref().emergencyCleanup();
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user