mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-25 10:07:38 +01:00
Clearer message for illegal IP addresses
This commit is contained in:
parent
4428409d41
commit
771f1735e5
@ -29,7 +29,12 @@ public class Util
|
||||
uri = new URI( "tcp://" + hostline );
|
||||
} catch ( URISyntaxException ex )
|
||||
{
|
||||
throw new IllegalArgumentException( "Bad hostline", ex );
|
||||
throw new IllegalArgumentException( "Bad hostline: " + hostline, ex );
|
||||
}
|
||||
|
||||
if ( uri.getHost() == null )
|
||||
{
|
||||
throw new IllegalArgumentException( "Invalid host/address: " + hostline );
|
||||
}
|
||||
|
||||
return new InetSocketAddress( uri.getHost(), ( uri.getPort() ) == -1 ? DEFAULT_PORT : uri.getPort() );
|
||||
|
Loading…
Reference in New Issue
Block a user