Catch a more general form of exception, as we don't make use of the more specific. Had issues with Runtime type information on OSX, not sure exactly what the
problem is but this generalization of exception handling seem to make it work safely.
This commit is contained in:
@@ -281,7 +281,7 @@ void CacheManager::deleteDir (const Glib::ustring& dirName) {
|
||||
safe_g_remove (Glib::build_filename (Glib::build_filename (baseDir, dirName), *i));
|
||||
delete dir;
|
||||
}
|
||||
catch (const Glib::FileError& fe) {
|
||||
catch (const Glib::Error& e) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -248,12 +248,12 @@ void FlatField::setShortcutPath(Glib::ustring path)
|
||||
try {
|
||||
flatFieldFile->remove_shortcut_folder(lastShortcutPath);
|
||||
}
|
||||
catch (Gtk::FileChooserError &err) {}
|
||||
catch (Glib::Error &err) {}
|
||||
}
|
||||
lastShortcutPath = path;
|
||||
try {
|
||||
flatFieldFile->add_shortcut_folder(path);
|
||||
}
|
||||
catch (Gtk::FileChooserError &err) {}
|
||||
catch (Glib::Error &err) {}
|
||||
}
|
||||
}
|
||||
|
@@ -1076,7 +1076,7 @@ void Preferences::parseDir (Glib::ustring dirname, std::vector<Glib::ustring>& i
|
||||
try {
|
||||
dir = new Glib::Dir (dirname);
|
||||
}
|
||||
catch (const Glib::FileError& fe) {
|
||||
catch (const Glib::Error& e) {
|
||||
return;
|
||||
}
|
||||
for (Glib::DirIterator i = dir->begin(); i!=dir->end(); ++i) {
|
||||
|
@@ -224,7 +224,7 @@ void ProfilePanel::save_clicked (GdkEventButton* event) {
|
||||
try {
|
||||
dialog.add_shortcut_folder(options.getPreferredProfilePath());
|
||||
}
|
||||
catch (Gtk::FileChooserError &err) {}
|
||||
catch (Glib::Error &err) {}
|
||||
//Add the image's path to the Shortcut list
|
||||
#ifdef WIN32
|
||||
// Dirty workaround, waiting for a clean solution by using exceptions!
|
||||
@@ -233,7 +233,7 @@ void ProfilePanel::save_clicked (GdkEventButton* event) {
|
||||
try {
|
||||
dialog.add_shortcut_folder(imagePath);
|
||||
}
|
||||
catch (Gtk::FileChooserError &err) {}
|
||||
catch (Glib::Error &err) {}
|
||||
|
||||
//Add response buttons the the dialog:
|
||||
dialog.add_button(Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL);
|
||||
@@ -380,7 +380,7 @@ void ProfilePanel::load_clicked (GdkEventButton* event) {
|
||||
try {
|
||||
dialog.add_shortcut_folder(options.getPreferredProfilePath());
|
||||
}
|
||||
catch (Gtk::FileChooserError &err) {}
|
||||
catch (Glib::Error &err) {}
|
||||
|
||||
//Add the image's path to the Shortcut list
|
||||
#ifdef WIN32
|
||||
@@ -390,7 +390,7 @@ void ProfilePanel::load_clicked (GdkEventButton* event) {
|
||||
try {
|
||||
dialog.add_shortcut_folder(imagePath);
|
||||
}
|
||||
catch (Gtk::FileChooserError &err) {}
|
||||
catch (Glib::Error &err) {}
|
||||
|
||||
//Add response buttons the the dialog:
|
||||
dialog.add_button(Gtk::StockID("gtk-cancel"), Gtk::RESPONSE_CANCEL);
|
||||
|
@@ -270,7 +270,7 @@ void SaveAsDialog::setImagePath (Glib::ustring ipath) {
|
||||
try {
|
||||
fchooser->add_shortcut_folder(path);
|
||||
}
|
||||
catch (Gtk::FileChooserError &err) {}
|
||||
catch (Glib::Error &err) {}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user