From a858f199a11ef657a8f0dfa6102abb6cbab7391b Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 15 Feb 2019 18:27:22 +0100 Subject: [PATCH] Simply debugging port-registration failures --- libs/ardour/port_manager.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/ardour/port_manager.cc b/libs/ardour/port_manager.cc index f5304f4961..85aa9819d6 100644 --- a/libs/ardour/port_manager.cc +++ b/libs/ardour/port_manager.cc @@ -414,7 +414,7 @@ PortManager::register_port (DataType dtype, const string& portname, bool input, PortDeleter()); } } else { - throw PortRegistrationFailure("unable to create port (unknown type)"); + throw PortRegistrationFailure (string_compose ("unable to create port '%1': %2", portname, _("(unknown type)"))); } RCUWriter writer (ports); @@ -428,10 +428,9 @@ PortManager::register_port (DataType dtype, const string& portname, bool input, catch (PortRegistrationFailure& err) { throw err; } catch (std::exception& e) { - throw PortRegistrationFailure(string_compose( - _("unable to create port: %1"), e.what()).c_str()); + throw PortRegistrationFailure (string_compose ("unable to create port '%1': %2", portname, e.what()).c_str()); } catch (...) { - throw PortRegistrationFailure("unable to create port (unknown error)"); + throw PortRegistrationFailure (string_compose ("unable to create port '%1': %2", portname, _("(unknown error)"))); } DEBUG_TRACE (DEBUG::Ports, string_compose ("\t%2 port registration success, ports now = %1\n", ports.reader()->size(), this));