From b5fddaf3ce74d865383462aed035854f8271bbcb Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 21 Feb 2019 10:41:31 +0100 Subject: [PATCH] ApiListener: log why bind(2) failed --- lib/remote/apilistener.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index d56c532bf..4928c285c 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -385,9 +385,9 @@ bool ApiListener::AddListener(const String& node, const String& service) } } } - } catch (const std::exception&) { + } catch (const std::exception& ex) { Log(LogCritical, "ApiListener") - << "Cannot bind TCP socket for host '" << node << "' on port '" << service << "'."; + << "Cannot bind TCP socket for host '" << node << "' on port '" << service << "': " << DiagnosticInformation(ex, false); return false; }