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>
This commit is contained in:
		
							parent
							
								
									0899b49bb3
								
							
						
					
					
						commit
						240e049e46
					
				@ -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");
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user