]> granicus.if.org Git - icinga2/commitdiff
ApiListener: log why bind(2) failed
authorAlexander A. Klimov <alexander.klimov@icinga.com>
Thu, 21 Feb 2019 09:41:31 +0000 (10:41 +0100)
committerAlexander A. Klimov <alexander.klimov@icinga.com>
Mon, 1 Apr 2019 11:31:16 +0000 (13:31 +0200)
lib/remote/apilistener.cpp

index d56c532bf77d846ba6a44463871d0fbde60239c2..4928c285c66a859840aa10674b8c2d796e5b7073 100644 (file)
@@ -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;
        }