Skip to content

Commit c9132d7

Browse files
authored
Tell the user the address that failed to connect.
Current: ``` Caused by: org.zeromq.ZMQException: blah-blah : Address not available ``` Yes, but _which_ address?? New error (I think?): ``` Caused by: org.zeromq.ZMQException: failed connecting to 0.0.0.0:5678: blah-blah : Address not available ```
1 parent 96424e7 commit c9132d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jeromq-core/src/main/java/zmq/io/net/tcp/TcpAddress.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public InetSocketAddress resolve(String name, boolean ipv6, boolean local)
160160
}
161161
}
162162
catch (UnknownHostException e) {
163-
throw new ZMQException(e.getMessage(), ZError.EADDRNOTAVAIL, e);
163+
throw new ZMQException("failed connecting to " + addrStr + ": " + e.getMessage(), ZError.EADDRNOTAVAIL, e);
164164
}
165165

166166
if (addrNet == null) {

0 commit comments

Comments
 (0)