extracting method

This commit is contained in:
rusefillc 2024-06-17 12:14:23 -04:00
parent c3c194e49f
commit 78b948b3f1
2 changed files with 5 additions and 1 deletions

View File

@ -199,7 +199,7 @@ public class ConsoleUI {
getConfig().load();
FileLog.suspendLogging = getConfig().getRoot().getBoolProperty(GaugesPanel.DISABLE_LOGS);
Thread.setDefaultUncaughtExceptionHandler(new DefaultExceptionHandler());
DefaultExceptionHandler.install();
// not very useful? VersionChecker.start();
SwingUtilities.invokeAndWait(() -> awtCode(args));
}

View File

@ -21,6 +21,10 @@ public class DefaultExceptionHandler implements Thread.UncaughtExceptionHandler
private static boolean hadExceptionAlready;
public static void install() {
Thread.setDefaultUncaughtExceptionHandler(new DefaultExceptionHandler());
}
public void uncaughtException(Thread t, Throwable e) {
handleException(e);
}