We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/** * 当UncaughtException发生时会转入该函数来处理 * 该方法来实现对运行时线程进行异常处理 */ @Override public void uncaughtException(Thread thread, Throwable ex) { Log.e("TAG", "uncaughtException: 。。。。。。。。。" ); boolean isHandle = handleException(ex); initCustomBug(ex); if (mDefaultHandler != null && !isHandle) { //收集完信息后,交给系统自己处理崩溃 //uncaughtException (Thread t, Throwable e) 是一个抽象方法 //当给定的线程因为发生了未捕获的异常而导致终止时将通过该方法将线程对象和异常对象传递进来。 mDefaultHandler.uncaughtException(thread, ex); } else { //否则自己处理 if (mContext instanceof Application){ ToolLogUtils.w(TAG, "handleException--- ex----重启activity-"); if (listener!=null){ listener.againStartApp(); } } } CrashHelper.getInstance().setSafe(thread,ex); }
============================================================= 我在这个uncaughtException获取当前线程。得到的当前线程是main线程。 为什么写文件时没有去开线程呢? 我试了去开启线程去写。 偶尔文件会写不成功。程序就直接挂了。 有时又是成功的。 请问作者是否可以解答下我这个疑问呢。 非常非常感谢。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
=============================================================
我在这个uncaughtException获取当前线程。得到的当前线程是main线程。 为什么写文件时没有去开线程呢?
我试了去开启线程去写。 偶尔文件会写不成功。程序就直接挂了。 有时又是成功的。
请问作者是否可以解答下我这个疑问呢。 非常非常感谢。
The text was updated successfully, but these errors were encountered: