extracting method
This commit is contained in:
parent
c3c194e49f
commit
78b948b3f1
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue