Glib throws a const FileError exception
This commit is contained in:
parent
770a1a8a36
commit
7c3fd2fe79
|
@ -1258,7 +1258,7 @@ LuaPluginInfo::load (Session& session)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
script = Glib::file_get_contents (path);
|
script = Glib::file_get_contents (path);
|
||||||
} catch (Glib::FileError err) {
|
} catch (Glib::FileError const& err) {
|
||||||
return PluginPtr ();
|
return PluginPtr ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -262,7 +262,7 @@ LuaScripting::scan_script (const std::string &fn, const std::string &sc)
|
||||||
try {
|
try {
|
||||||
std::string script = Glib::file_get_contents (fn);
|
std::string script = Glib::file_get_contents (fn);
|
||||||
sha1_write (&s, (const uint8_t *) script.c_str(), script.size ());
|
sha1_write (&s, (const uint8_t *) script.c_str(), script.size ());
|
||||||
} catch (Glib::FileError err) {
|
} catch (Glib::FileError const& err) {
|
||||||
return LuaScriptInfoPtr();
|
return LuaScriptInfoPtr();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
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
|
assert (0); // not reached
|
||||||
}
|
}
|
||||||
} catch (Glib::FileError) {
|
} catch (Glib::FileError const&) {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ LuaScriptTest::session_script_test ()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
script = Glib::file_get_contents (spi->path);
|
script = Glib::file_get_contents (spi->path);
|
||||||
} catch (Glib::FileError e) {
|
} catch (Glib::FileError const& e) {
|
||||||
CPPUNIT_FAIL ("Cannot read script file");
|
CPPUNIT_FAIL ("Cannot read script file");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
std::cerr << "listing /Volumnes failed: " << e.what() << std::endl;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -127,7 +127,7 @@ run_functor_for_paths (vector<string>& result,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Glib::FileError& err)
|
catch (Glib::FileError const& err)
|
||||||
{
|
{
|
||||||
warning << err.what() << endmsg;
|
warning << err.what() << endmsg;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user