Log an uncaught exception before it crashes the app.
This commit is contained in:
parent
e0421b509c
commit
fb6bcfdccd
1 changed files with 2 additions and 0 deletions
|
@ -139,6 +139,8 @@ 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));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (FabricPrivacy.fabricEnabled()) {
|
if (FabricPrivacy.fabricEnabled()) {
|
||||||
Fabric.with(this, new Crashlytics());
|
Fabric.with(this, new Crashlytics());
|
||||||
|
|
Loading…
Reference in a new issue