mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Handle exception thrown by Buffer::emergencyWrite
Spotted by coverity
This commit is contained in:
parent
6b2444a7df
commit
f14ce3f2ef
@ -553,7 +553,11 @@ Buffer::~Buffer()
|
||||
|
||||
if (!isClean()) {
|
||||
docstring msg = _("LyX attempted to close a document that had unsaved changes!\n");
|
||||
msg += emergencyWrite();
|
||||
try {
|
||||
msg += emergencyWrite();
|
||||
} catch (...) {
|
||||
msg += " " + _("Save failed! Bummer. Document is lost.");
|
||||
}
|
||||
Alert::warning(_("Attempting to close changed document!"), msg);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user