From a589f520c149a6c033ba788f1be08cfe82856b8c Mon Sep 17 00:00:00 2001 From: James deBoer Date: Fri, 6 Nov 2020 15:58:05 -0500 Subject: [PATCH] netty: Improve an exception message with more context (#7593) Adds the address we are attempting to bind to. This context is useful for tracking down errors in configuration. --- netty/src/main/java/io/grpc/netty/NettyServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netty/src/main/java/io/grpc/netty/NettyServer.java b/netty/src/main/java/io/grpc/netty/NettyServer.java index 0cd4e749af5..c5aeed17deb 100644 --- a/netty/src/main/java/io/grpc/netty/NettyServer.java +++ b/netty/src/main/java/io/grpc/netty/NettyServer.java @@ -261,7 +261,7 @@ public void operationComplete(ChannelFuture future) throws Exception { // See #6850 future.awaitUninterruptibly(); if (!future.isSuccess()) { - throw new IOException("Failed to bind", future.cause()); + throw new IOException(String.format("Failed to bind to address %s", address), future.cause()); } channel = future.channel(); channel.eventLoop().execute(new Runnable() {