v0.8.0: added log output to the desktop error handler

This commit is contained in:
Evan Debenham 2019-12-01 13:06:35 -05:00
parent 0259dd20c3
commit 8afa87fb10

View File

@ -60,6 +60,7 @@ public class DesktopLauncher {
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override @Override
public void uncaughtException(Thread thread, Throwable throwable) { public void uncaughtException(Thread thread, Throwable throwable) {
Game.reportException(throwable);
StringWriter sw = new StringWriter(); StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw); PrintWriter pw = new PrintWriter(sw);
throwable.printStackTrace(pw); throwable.printStackTrace(pw);