From 12a510271306df4af7a7db241ed7cf07f35fdf06 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 23 Nov 2017 10:38:52 +0100 Subject: Catch exceptions by const reference --- gtk2_ardour/luainstance.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gtk2_ardour/luainstance.cc') diff --git a/gtk2_ardour/luainstance.cc b/gtk2_ardour/luainstance.cc index a37270e112..156ad11d34 100644 --- a/gtk2_ardour/luainstance.cc +++ b/gtk2_ardour/luainstance.cc @@ -1323,7 +1323,7 @@ LuaInstance::interactive_add (LuaScriptInfo::ScriptType type, int id) try { script = Glib::file_get_contents (spi->path); - } catch (Glib::FileError e) { + } catch (Glib::FileError const& e) { string msg = string_compose (_("Cannot read script '%1': %2"), spi->path, e.what()); Gtk::MessageDialog am (msg); am.run (); @@ -1360,7 +1360,7 @@ LuaInstance::interactive_add (LuaScriptInfo::ScriptType type, int id) string msg = string_compose (_("Session script '%1' instantiation failed: %2"), spd.name(), e.what ()); Gtk::MessageDialog am (msg); am.run (); - } catch (SessionException e) { + } catch (SessionException const& e) { string msg = string_compose (_("Loading Session script '%1' failed: %2"), spd.name(), e.what ()); Gtk::MessageDialog am (msg); am.run (); -- cgit v1.2.3