From 5f0279ab069e54dbd088e9176d68ed046e2d7726 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 17 Aug 2017 19:28:14 +0200 Subject: Catch some exceptions during session loading. --- libs/ardour/session.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libs/ardour/session.cc') 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); } -- cgit v1.2.3