log uncaught exceptions in ffdec log window

This commit is contained in:
honfika@gmail.com
2016-02-26 08:55:19 +01:00
parent 4d5a09d669
commit 8262b137f1

View File

@@ -2235,6 +2235,14 @@ public class Main {
}
}
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread t, Throwable e) {
logger.log(Level.SEVERE, "Uncaught exception in thread: " + t.getName(), e);
}
});
Formatter formatterTxt = new LogFormatter();
if (fileTxt != null) {
fileTxt.setFormatter(formatterTxt);