Glib throws a const FileError exception
authorRobin Gareus <robin@gareus.org>
Fri, 26 Oct 2018 11:40:03 +0000 (13:40 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 26 Oct 2018 11:40:03 +0000 (13:40 +0200)
libs/ardour/luaproc.cc
libs/ardour/luascripting.cc
libs/ardour/session_directory.cc
libs/ardour/test/lua_script_test.cc
libs/gtkmm2ext/utils.cc
libs/pbd/file_utils.cc

index ec13efb1bf1888a27123aa5a3afdf5535ac177d5..bf93e1df676adfe690d31b3590a2b6e1679c1579 100644 (file)
@@ -1258,7 +1258,7 @@ LuaPluginInfo::load (Session& session)
 
        try {
                script = Glib::file_get_contents (path);
-       } catch (Glib::FileError err) {
+       } catch (Glib::FileError const& err) {
                return PluginPtr ();
        }
 
index 1193e081301834acd875ebe41440c1d32e93bd83..e748fb656e792752bbb0792bb0f7eca2b2fd3ee0 100644 (file)
@@ -262,7 +262,7 @@ LuaScripting::scan_script (const std::string &fn, const std::string &sc)
                try {
                        std::string script = Glib::file_get_contents (fn);
                        sha1_write (&s, (const uint8_t *) script.c_str(), script.size ());
-               } catch (Glib::FileError err) {
+               } catch (Glib::FileError const& err) {
                        return LuaScriptInfoPtr();
                }
        }
index 1f6b991f8282b8fe0945b8a3cc7af8cfa0a0dc86..fd90959ac4ca04dfa7335e906f41bfe1c467d7b0 100644 (file)
@@ -167,7 +167,7 @@ SessionDirectory::sources_root () const
                        PBD::fatal << string_compose (_("The session's interchange dir is tainted.\nThere is more than one folder in '%1'.\nPlease remove extra subdirs to reduce possible filename ambiguties."), sources_root_path) << endmsg;
                        assert (0); // not reached
                }
-       } catch (Glib::FileError) {
+       } catch (Glib::FileError const&) {
                ;
        }
 
index a404824d153080260a4de73ebb27f0d63fd8c794..d707fdb34e7d13f3cec7369a707befd2a9e58ac8 100644 (file)
@@ -32,7 +32,7 @@ LuaScriptTest::session_script_test ()
 
                try {
                        script = Glib::file_get_contents (spi->path);
-               } catch (Glib::FileError e) {
+               } catch (Glib::FileError const& e) {
                        CPPUNIT_FAIL ("Cannot read script file");
                        continue;
                }
index aa139981fc4c5d7651339e6b64cd83de9a1565a2..bdb44090c3041d612cfa7e46c6f1cc6f1b3aef04 100644 (file)
@@ -1114,7 +1114,7 @@ Gtkmm2ext::add_volume_shortcuts (Gtk::FileChooser& c)
                        }
                }
        }
-       catch (Glib::FileError& e) {
+       catch (Glib::FileError const& e) {
                std::cerr << "listing /Volumnes failed: " << e.what() << std::endl;
        }
 #endif
index 4549e9300907c0b65ec46bd4bed5089384366ce0..3fc3cdf99edb814b6d304915c3748d984be512f1 100644 (file)
@@ -127,7 +127,7 @@ run_functor_for_paths (vector<string>& result,
                                }
                        }
                }
-               catch (Glib::FileError& err)
+               catch (Glib::FileError const& err)
                {
                        warning << err.what() << endmsg;
                }