Add saving crash log
This commit is contained in:
1 parent
6d72349ee7
commit
c5a6526171
9 files changed
+196
No files matched your search
@@ -104,6 +104,19 @@ public class EhApplication extends RecordingApplication {
|
||||
public void onCreate() {
|
||||
instance = this;
|
||||
|
||||
Thread.UncaughtExceptionHandler handler = Thread.getDefaultUncaughtExceptionHandler();
|
||||
Thread.setDefaultUncaughtExceptionHandler((t, e) -> {
|
||||
try {
|
||||
if (Settings.getSaveCrashLog()) {
|
||||
Crash.saveCrashLog(instance, e);
|
||||
}
|
||||
} catch (Throwable ignored) { }
|
||||
|
||||
if (handler != null) {
|
||||
handler.uncaughtException(t, e);
|
||||
}
|
||||
});
|
||||
|
||||
super.onCreate();
|
||||
|
||||
GetText.initialize(this);
|
||||
|
||||
Reference in new issue
Block a user