Catch wrong backend exception.

This commit is contained in:
Bas de Jong
2025-09-11 16:12:11 +02:00
parent 11556ad363
commit a8e09f6775

View File

@@ -178,7 +178,11 @@ public class Server extends Thread {
}
public static void start(String backend, String ip, String port) {
new Server(ServerBackend.valueOf(backend.toUpperCase()), ip, port).start();
try {
new Server(ServerBackend.valueOf(backend.toUpperCase()), ip, port).start();
} catch (IllegalArgumentException e) {
new Server(ServerBackend.LOCAL, ip, port).start();
}
}
}