From 3792e95138e316dcff3a40d97823510dad702995 Mon Sep 17 00:00:00 2001 From: Steve Hu Date: Tue, 12 Feb 2019 08:44:24 -0500 Subject: [PATCH] fixes #384 output the stacktrace when server registration fails (#385) --- server/src/main/java/com/networknt/server/Server.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/com/networknt/server/Server.java b/server/src/main/java/com/networknt/server/Server.java index 36e0d05b71..2912b35126 100644 --- a/server/src/main/java/com/networknt/server/Server.java +++ b/server/src/main/java/com/networknt/server/Server.java @@ -286,8 +286,9 @@ static private boolean bind(HttpHandler handler, int port) { return true; } catch (Exception e) { System.out.println("Failed to bind to port " + port); + e.printStackTrace(System.out); if (logger.isInfoEnabled()) - logger.info("Failed to bind to port " + port); + logger.info("Failed to bind to port " + port, e); return false; } }