Catch new exception in other places.
authorRobin Gareus <robin@gareus.org>
Wed, 30 Aug 2017 15:53:31 +0000 (17:53 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 30 Aug 2017 15:53:31 +0000 (17:53 +0200)
libs/midi++2/midnam_patch.cc

index ad7a8f20de3f6157f85d2508dc242fdeda19e6b7..eb7274e69fec435e78f70646c75cf41766a8f87b 100644 (file)
@@ -567,8 +567,12 @@ ChannelNameSet::set_state (const XMLTree& tree, const XMLNode& node)
                        for (XMLSharedNodeList::const_iterator i = channels->begin();
                            i != channels->end();
                            ++i) {
                        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 ());
                        }
                } else if (node->name() == "PatchBank") {
                        boost::shared_ptr<PatchBank> bank (new PatchBank ());