diff options
author | Robin Gareus <robin@gareus.org> | 2015-09-05 15:45:59 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-09-05 15:45:59 +0200 |
commit | 1c9bb7de66dc9152f75cd907ded0f324e3d24626 (patch) | |
tree | 5cfade5d3e4c68c646484fbba62aae6092820830 /gtk2_ardour | |
parent | 56eae394cc37084eb92ac53c409ddfae09e6884e (diff) |
display session create/open failure errors.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 3aae162e9c..beb96f4348 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -3206,7 +3206,26 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name, } goto out; } + catch (SessionException e) { + MessageDialog msg (string_compose( + _("Session \"%1 (snapshot %2)\" did not load successfully: %3"), + path, snap_name, e.what()), + true, + Gtk::MESSAGE_INFO, + BUTTONS_OK); + + msg.set_title (_("Loading Error")); + msg.set_position (Gtk::WIN_POS_CENTER); + pop_back_splash (msg); + msg.present (); + + dump_errors (cerr); + + (void) msg.run (); + msg.hide (); + goto out; + } catch (...) { MessageDialog msg (string_compose( @@ -3307,9 +3326,20 @@ ARDOUR_UI::build_session (const std::string& path, const std::string& snap_name, new_session = new Session (*AudioEngine::instance(), path, snap_name, &bus_profile); } + catch (SessionException e) { + dump_errors (cerr); + MessageDialog msg (string_compose(_("Could not create session in \"%1\": %2"), path, e.what())); + msg.set_title (_("Loading Error")); + msg.set_position (Gtk::WIN_POS_CENTER); + pop_back_splash (msg); + msg.run (); + return -1; + } catch (...) { - + dump_errors (cerr); MessageDialog msg (string_compose(_("Could not create session in \"%1\""), path)); + msg.set_title (_("Loading Error")); + msg.set_position (Gtk::WIN_POS_CENTER); pop_back_splash (msg); msg.run (); return -1; |