diff options
author | Robin Gareus <robin@gareus.org> | 2017-11-23 10:38:52 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-11-23 10:38:52 +0100 |
commit | 12a510271306df4af7a7db241ed7cf07f35fdf06 (patch) | |
tree | 6ffcda5a5384f65f45110a08d9c3483d1d052948 /gtk2_ardour/luawindow.cc | |
parent | 3009fd75749e9bfe7ef3748eb94226b53cbbe264 (diff) |
Catch exceptions by const reference
Diffstat (limited to 'gtk2_ardour/luawindow.cc')
-rw-r--r-- | gtk2_ardour/luawindow.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk2_ardour/luawindow.cc b/gtk2_ardour/luawindow.cc index 4e02cd2b20..76f20178ec 100644 --- a/gtk2_ardour/luawindow.cc +++ b/gtk2_ardour/luawindow.cc @@ -464,7 +464,7 @@ LuaWindow::save_script () update_gui_state (); // XXX here? append_text (X_("> ") + string_compose (_("Saved as %1"), sb.path)); return; // OK - } catch (Glib::FileError e) { + } catch (Glib::FileError const& e) { msg = string_compose (_("Error saving file: %1"), e.what()); goto errorout; } @@ -516,7 +516,7 @@ LuaWindow::save_script () LuaScripting::instance().refresh (true); append_text (X_("> ") + string_compose (_("Saved as %1"), path)); return; // OK - } catch (Glib::FileError e) { + } catch (Glib::FileError const& e) { msg = string_compose (_("Error saving file: %1"), e.what()); goto errorout; } @@ -743,7 +743,7 @@ LuaWindow::ScriptBuffer::load () script = Glib::file_get_contents (path); flags |= Buffer_Valid; flags &= BufferFlags(~Buffer_Dirty); - } catch (Glib::FileError e) { + } catch (Glib::FileError const& e) { return false; } return true; |