Skip to content

Commit a589f52

Browse files
authored
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.
1 parent 01e3832 commit a589f52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netty/src/main/java/io/grpc/netty/NettyServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public void operationComplete(ChannelFuture future) throws Exception {
261261
// See #6850
262262
future.awaitUninterruptibly();
263263
if (!future.isSuccess()) {
264-
throw new IOException("Failed to bind", future.cause());
264+
throw new IOException(String.format("Failed to bind to address %s", address), future.cause());
265265
}
266266
channel = future.channel();
267267
channel.eventLoop().execute(new Runnable() {

0 commit comments

Comments
 (0)