In Android ,I create a class implements UncaughtExceptionHandler , and set it as a default handler . At most time it work well , but at a special case i can't found log print by this.
In this special case, i see Application class run oncreate again , and pre Activity oncreate , current Activity missed. it seems like a crash happened, but in my CrashHandler did't caught it. is there some crash can avoid this?
@Override
public void uncaughtException(Thread thread, Throwable ex) {
// in special case, we can't found log printed here.
LogUtil.e(TAG, "uncaughtException" + ex.getMessage());
// handleException(ex) is we used to print log.
if (!handleException(ex) && mDefaultHandler != null) {
LogUtil.e(TAG, "uncaughtException user don't handle");
mDefaultHandler.uncaughtException(thread, ex);
}
}