mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
GuiApplication::notify(): fine tune ErrorException handling; close all windows before showing the alert. This should get rid of the recursive alert box when an the exception is caught.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23333 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
265434519e
commit
0e67e8423f
@ -468,8 +468,16 @@ bool GuiApplication::notify(QObject * receiver, QEvent * event)
|
||||
}
|
||||
catch (ExceptionMessage const & e) {
|
||||
if (e.type_ == ErrorException) {
|
||||
LyX::cref().emergencyCleanup();
|
||||
setQuitOnLastWindowClosed(false);
|
||||
closeAllViews();
|
||||
Alert::error(e.title_, e.details_);
|
||||
LyX::cref().exit(1);
|
||||
#ifndef NDEBUG
|
||||
// Properly crash in debug mode in order to get a useful backtrace.
|
||||
abort();
|
||||
#endif
|
||||
// In release mode, try to exit gracefully.
|
||||
this->exit(1);
|
||||
} else if (e.type_ == WarningException) {
|
||||
Alert::warning(e.title_, e.details_);
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user