Gives the user some information about the crash.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20531 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-09-27 09:49:14 +00:00
parent 097ca4b228
commit 98b47fdc85

View File

@ -296,12 +296,18 @@ bool GuiApplication::notify(QObject * receiver, QEvent * event)
}
}
catch (std::exception const & e) {
lyxerr << "Caught \"normal\" exception: " << e.what() << endl;
docstring s = _("LyX has caught an exception, it will now "
"attemp to save all unsaved documents and exit."
"\n\nException: ");
s += from_ascii(e.what());
Alert::error(_("Software exception Detected"), s);
LyX::cref().emergencyCleanup();
QApplication::exit(1);
}
catch (...) {
lyxerr << "Caught some really weird exception..." << endl;
docstring s = _("LyX has caught some really weird exception, it will "
"now attemp to save all unsaved documents and exit.");
Alert::error(_("Software exception Detected"), s);
LyX::cref().emergencyCleanup();
QApplication::exit(1);
}