mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-09-27 06:42:42 +02:00
Add port-in-use check to plugin
This commit is contained in:
parent
f79254115e
commit
5274483fb9
@ -55,6 +55,7 @@
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.Writer;
|
||||
import java.net.BindException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.nio.file.Path;
|
||||
@ -194,6 +195,9 @@ private void load(@Nullable ResourcePack preloadedResourcePack) throws IOExcepti
|
||||
} catch (UnknownHostException ex) {
|
||||
throw new ConfigurationException("BlueMap failed to resolve the ip in your webserver-config.\n" +
|
||||
"Check if that is correctly configured.", ex);
|
||||
} catch (BindException ex) {
|
||||
throw new ConfigurationException("BlueMap failed to bind to the configured address.\n" +
|
||||
"This usually happens when the configured port (" + webserverConfig.getPort() + ") is already in use by some other program.", ex);
|
||||
} catch (IOException ex) {
|
||||
throw new ConfigurationException("BlueMap failed to initialize the webserver.\n" +
|
||||
"Check your webserver-config if everything is configured correctly.\n" +
|
||||
|
Loading…
Reference in New Issue
Block a user