Ignore InternalErrors during app shutdown.
This commit is contained in:
parent
cce3a77a37
commit
dc38615ec9
1 changed files with 8 additions and 1 deletions
|
@ -129,7 +129,14 @@ public class MainApp extends Application {
|
||||||
sConstraintsChecker = new ConstraintChecker();
|
sConstraintsChecker = new ConstraintChecker();
|
||||||
sDatabaseHelper = OpenHelperManager.getHelper(sInstance, DatabaseHelper.class);
|
sDatabaseHelper = OpenHelperManager.getHelper(sInstance, DatabaseHelper.class);
|
||||||
|
|
||||||
Thread.setDefaultUncaughtExceptionHandler((thread, ex) -> log.error("Uncaught exception crashing app", ex));
|
Thread.setDefaultUncaughtExceptionHandler((thread, ex) -> {
|
||||||
|
if (ex instanceof InternalError) {
|
||||||
|
// usually the app trying to spawn a thread while being killed
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
log.error("Uncaught exception crashing app", ex);
|
||||||
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (FabricPrivacy.fabricEnabled()) {
|
if (FabricPrivacy.fabricEnabled()) {
|
||||||
|
|
Loading…
Reference in a new issue