Merge pull request #2395 from Abextm/log-exceptions

runelite-client: Log uncaught exceptions
This commit is contained in:
Adam
2018-05-06 17:20:57 -04:00
committed by GitHub

View File

@@ -154,6 +154,15 @@ public class RuneLite
logger.setLevel(Level.DEBUG);
}
Thread.setDefaultUncaughtExceptionHandler((thread, throwable) ->
{
log.error("Uncaught exception:", throwable);
if (throwable instanceof AbstractMethodError)
{
log.error("Classes are out of date; Build with maven again.");
}
});
setInjector(Guice.createInjector(new RuneLiteModule()));
injector.getInstance(RuneLite.class).start(getOptions().valueOf(updateMode));
}