mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +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()) {
|
if (!isClean()) {
|
||||||
docstring msg = _("LyX attempted to close a document that had unsaved changes!\n");
|
docstring msg = _("LyX attempted to close a document that had unsaved changes!\n");
|
||||||
|
try {
|
||||||
msg += emergencyWrite();
|
msg += emergencyWrite();
|
||||||
|
} catch (...) {
|
||||||
|
msg += " " + _("Save failed! Bummer. Document is lost.");
|
||||||
|
}
|
||||||
Alert::warning(_("Attempting to close changed document!"), msg);
|
Alert::warning(_("Attempting to close changed document!"), msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user