diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-19 13:03:08 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-19 13:04:31 -0600 |
commit | 240e049e46f630fef5b1317e2ceb66604497a81f (patch) | |
tree | cc863e57f05f361e0192de508d0ae91591d2c9f5 /tunnel/src | |
parent | 0899b49bb3d479747da960a8b2055374729eaa49 (diff) |
InetEndpoint: return proper parser exception
Wrapping this in something foreign doesn't make sense.
Reported-by: Luis Ressel <aranea@aixah.de>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tunnel/src')
-rw-r--r-- | tunnel/src/main/java/com/wireguard/config/InetEndpoint.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tunnel/src/main/java/com/wireguard/config/InetEndpoint.java b/tunnel/src/main/java/com/wireguard/config/InetEndpoint.java index 0120de0e..6eff4a1b 100644 --- a/tunnel/src/main/java/com/wireguard/config/InetEndpoint.java +++ b/tunnel/src/main/java/com/wireguard/config/InetEndpoint.java @@ -51,7 +51,7 @@ public final class InetEndpoint { try { uri = new URI("wg://" + endpoint); } catch (final URISyntaxException e) { - throw new IllegalArgumentException(e); + throw new ParseException(InetEndpoint.class, endpoint, e); } if (uri.getPort() < 0 || uri.getPort() > 65535) throw new ParseException(InetEndpoint.class, endpoint, "Missing/invalid port number"); |