From 46b1bd2fd25e1b50eae010bbd94b4985127fe831 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Mon, 7 Aug 2023 12:20:07 +0200 Subject: [PATCH] improve address resolution error message --- .../java/com/sparrowwallet/sparrow/net/IpAddressMatcher.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/net/IpAddressMatcher.java b/src/main/java/com/sparrowwallet/sparrow/net/IpAddressMatcher.java index 456fb325..654770a6 100644 --- a/src/main/java/com/sparrowwallet/sparrow/net/IpAddressMatcher.java +++ b/src/main/java/com/sparrowwallet/sparrow/net/IpAddressMatcher.java @@ -96,9 +96,8 @@ public final class IpAddressMatcher { private InetAddress parseAddress(String address) { try { return InetAddress.getByName(address); - } - catch (UnknownHostException e) { - throw new IllegalArgumentException("Failed to parse address: " + address, e); + } catch(UnknownHostException e) { + throw new IllegalArgumentException("Failed to resolve address: " + address, e); } }