raise an exception when Options::save fails

See #3975 #3976
This commit is contained in:
Alberto Griggio
2017-07-20 17:03:21 +02:00
parent b6cd315515
commit 511f6c2a7b
8 changed files with 73 additions and 42 deletions

View File

@@ -303,7 +303,12 @@ void ExportPanel::SaveSettingsAsDefault()
#undef FE_OPT_STORE_
if (changed) {
Options::save();
try {
Options::save();
} catch (Options::Error &e) {
Gtk::MessageDialog msgd(getToplevelWindow(this), e.get_msg(), true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_CLOSE, true);
msgd.run();
}
}
}