improve address resolution error message

This commit is contained in:
Craig Raw 2023-08-07 12:20:07 +02:00
parent 2d7c5dcec7
commit 46b1bd2fd2

View file

@ -96,9 +96,8 @@ public final class IpAddressMatcher {
private InetAddress parseAddress(String address) { private InetAddress parseAddress(String address) {
try { try {
return InetAddress.getByName(address); return InetAddress.getByName(address);
} } catch(UnknownHostException e) {
catch (UnknownHostException e) { throw new IllegalArgumentException("Failed to resolve address: " + address, e);
throw new IllegalArgumentException("Failed to parse address: " + address, e);
} }
} }