From d11d8b8a96aa91143f2f08c13c27047093851236 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 30 Aug 2017 17:53:31 +0200 Subject: [PATCH] Catch new exception in other places. --- libs/midi++2/midnam_patch.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/midi++2/midnam_patch.cc b/libs/midi++2/midnam_patch.cc index ad7a8f20de..eb7274e69f 100644 --- a/libs/midi++2/midnam_patch.cc +++ b/libs/midi++2/midnam_patch.cc @@ -567,8 +567,12 @@ ChannelNameSet::set_state (const XMLTree& tree, const XMLNode& node) for (XMLSharedNodeList::const_iterator i = channels->begin(); i != channels->end(); ++i) { - _available_for_channels.insert( - string_to_int(tree, (*i)->attribute_value())); + try { + _available_for_channels.insert( + string_to_int(tree, (*i)->attribute_value())); + } catch (XMLException &e) { + cerr << "ChannelNameSet::set_state: " << e.what () << endl; + } } } else if (node->name() == "PatchBank") { boost::shared_ptr bank (new PatchBank ()); -- 2.30.2