[TASK] Added exception handler to client

This commit is contained in:
Jeroen Ketelaar
2019-05-21 23:28:36 -05:00
parent 19bb75f09b
commit 223171f03f
+4 -2
View File
@@ -11,10 +11,11 @@ import org.parabot.core.network.proxy.ProxyType;
import org.parabot.core.ui.BotUI;
import org.parabot.core.ui.ServerSelector;
import org.parabot.core.ui.utils.UILog;
import org.parabot.environment.handlers.exceptions.ExceptionHandler;
import org.parabot.environment.handlers.exceptions.FileExceptionHandler;
import javax.swing.*;
import java.io.File;
import java.io.IOException;
/**
* Parabot v2.7
@@ -27,7 +28,8 @@ public final class Landing {
private static String username;
private static String password;
public static void main(String... args) throws IOException {
public static void main(String... args) {
Thread.setDefaultUncaughtExceptionHandler(new FileExceptionHandler(ExceptionHandler.ExceptionType.CLIENT));
if (Context.getJavaVersion() >= 9) {
UILog.log("Parabot", "Parabot doesn't support Java 9+ currently. Please downgrade to Java 8 to ensure Parabot is working correctly.");