diff options
author | Robin Gareus <robin@gareus.org> | 2017-06-27 20:28:45 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-27 20:28:45 +0200 |
commit | 1f5013b4a872a5a59a14705aa07331baaff5f77f (patch) | |
tree | 5431c34c61f2cd6c6168a73177e69fdbc795b6d9 /libs/ardour/session.cc | |
parent | 1dd4aab0b4d3e14ef93ddb3470d4c386f48cda6b (diff) |
Distinguish error-messages.
The vast majority of errors reported by users as
"Cannot configure audio/midi engine with session parameters"
have nothing to do with engine-parameters.
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 416f972ea7..0463794d84 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -412,9 +412,27 @@ Session::Session (AudioEngine &eng, } } - if (post_engine_init ()) { + int err = post_engine_init (); + if (err) { destroy (); - throw SessionException (_("Cannot configure audio/midi engine with session parameters")); + switch (err) { + case -1: + throw SessionException (string_compose (_("Cannot initialize session/engine: %1"), _("Failed to create background threads."))); + break; + case -2: + case -3: + throw SessionException (string_compose (_("Cannot initialize session/engine: %1"), _("Invalid TempoMap in session-file."))); + break; + case -4: + throw SessionException (string_compose (_("Cannot initialize session/engine: %1"), _("Invalid or corrupt session state."))); + break; + case -5: + throw SessionException (string_compose (_("Cannot initialize session/engine: %1"), _("Port registration failed."))); + break; + default: + throw SessionException (string_compose (_("Cannot initialize session/engine: %1"), _("Unexpected exception during session setup, possibly invalid audio/midi engine parameters. Please see stdout/stderr for details"))); + break; + } } store_recent_sessions (_name, _path); |