output more stuff to the error channel if/when a session fails to load/be created
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 28 Sep 2016 16:27:47 +0000 (11:27 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 28 Sep 2016 16:28:45 +0000 (11:28 -0500)
libs/ardour/session_state.cc

index 14de04163c3f39f809354a36d15282b269d817d2..d27d9636461ed3afd996e8b0205f85e9041330e3 100644 (file)
@@ -237,10 +237,12 @@ Session::post_engine_init ()
        setup_midi_machine_control ();
 
        if (_butler->start_thread()) {
        setup_midi_machine_control ();
 
        if (_butler->start_thread()) {
+               error << _("Butler did not start") << endmsg;
                return -1;
        }
 
        if (start_midi_thread ()) {
                return -1;
        }
 
        if (start_midi_thread ()) {
+               error << _("MIDI I/O thread did not start") << endmsg;
                return -1;
        }
 
                return -1;
        }
 
@@ -278,6 +280,7 @@ Session::post_engine_init ()
 
                if (state_tree) {
                        if (set_state (*state_tree->root(), Stateful::loading_state_version)) {
 
                if (state_tree) {
                        if (set_state (*state_tree->root(), Stateful::loading_state_version)) {
+                               error << _("Could not set session state from XML") << endmsg;
                                return -1;
                        }
                } else {
                                return -1;
                        }
                } else {
@@ -344,7 +347,11 @@ Session::post_engine_init ()
                /* handle this one in a different way than all others, so that its clear what happened */
                error << err.what() << endmsg;
                return -1;
                /* handle this one in a different way than all others, so that its clear what happened */
                error << err.what() << endmsg;
                return -1;
+       } catch (std::exception const & e) {
+               error << _("Unexpected exception during session setup: ") << e.what() << endmsg;
+               return -1;
        } catch (...) {
        } catch (...) {
+               error << _("Unknown exception during session setup") << endmsg;
                return -1;
        }
 
                return -1;
        }