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

@@ -673,7 +673,12 @@ bool RTWindow::on_delete_event(GdkEventAny* event)
options.windowMonitor = get_screen()->get_monitor_at_window(get_window());
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();
}
hide();
on_delete_has_run = true;