diff options
author | Robin Gareus <robin@gareus.org> | 2017-08-30 17:53:31 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-08-30 17:53:31 +0200 |
commit | d11d8b8a96aa91143f2f08c13c27047093851236 (patch) | |
tree | 462061c4cdd73cb8a7cab9ace3171b293360a463 /libs/midi++2 | |
parent | 3d9a0a1f983afa7137e59b6e77b23838c990a243 (diff) |
Catch new exception in other places.
Diffstat (limited to 'libs/midi++2')
-rw-r--r-- | libs/midi++2/midnam_patch.cc | 8 |
1 files 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<PatchBank> bank (new PatchBank ()); |