My question is how to catch unhandled errors in Android application and pass them further so it will indeed crash the application.
I'm creating SDK for Android and I still want developers to handle their errors but I also want to get informed about crashes of mine.
I know that to catch an error I could use:
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread thread, Throwable ex) {
}
});
But how to pass it futher? How to crash application? If I use:
throw new RuntimeException(ex);
It won't crash application but rather cause ANR error.
The second question is how does Fabric (Crashlytics) library work? Mind that I also don't want to spoil workflow of Fabric if it's also present in the application.