diff options
author | Robin Gareus <robin@gareus.org> | 2017-08-17 19:28:14 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-08-17 19:28:14 +0200 |
commit | 5f0279ab069e54dbd088e9176d68ed046e2d7726 (patch) | |
tree | ba1ba91dfa006e79fe2833fbd27f70e76b6ddf0e /libs/ardour/session.cc | |
parent | 8ecbf0486f9e74236689f2d57880660bc11680f9 (diff) |
Catch some exceptions during session loading.
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index de236f6120..324e235c72 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -380,8 +380,12 @@ Session::Session (AudioEngine &eng, */ if (!mix_template.empty()) { - if (load_state (_current_snapshot_name)) { - throw SessionException (_("Failed to load template/snapshot state")); + try { + if (load_state (_current_snapshot_name)) { + throw SessionException (_("Failed to load template/snapshot state")); + } + } catch (PBD::unknown_enumeration& e) { + throw SessionException (_("Failed to parse template/snapshot state")); } store_recent_templates (mix_template); } |