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

@@ -2066,7 +2066,12 @@ void Preferences::okPressed ()
workflowUpdate();
options.copyFrom (&moptions);
options.filterOutParsedExtensions();
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();
}
dynProfilePanel->save();
hide ();
}