未捕获的异常处理程序中的未捕获的异常
这个问题可能听起来有点傻;)
如何处理 UncaughtExceptionHandler?
This question may sound a little silly ;)
How would approach the possibility of an uncaught exception within the UncaughtExceptionHandler?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
非常有趣的问题,我以前没有考虑过这个问题。
该方法似乎是要么在线程上设置您自己的 uncaughtExceptionHandler ,要么将其传递给 JAVA defaultUncaughtExceptionHandler ,
我做了一些快速的谷歌搜索,发现了类似的崩溃情况来自安卓的数据。
我想您可能会感兴趣这个链接 我该怎么办从我的 Android 应用程序获取崩溃数据?
Very interesting question, I haven't thought about this before.
The approch seems to be that either set your own
uncaughtExceptionHandler
on your thread or it will get passed to JAVAsdefaultUncaughtExceptionHandler
,I made some quick googeling and found a similar case for getting crash data from android.
I think you may be intresing in this link How do I obtain crash-data from my Android application?
好吧,你必须自己抓住它们。您链接的 uncaughtException() 文档清楚地说明了这一点:
但你只能计划到目前为止。因此,您处理异常处理程序的异常,但谁处理该代码呢?这与记录失败的日志事件相同。异常处理程序一直向下......
Well, you have to catch them yourself. The documentation of
uncaughtException()
linked by you states this clearly:But you can only plan so far. So you handle the exceptions of your exception handler but who handles that code? It's the same with logging a failed logging event. Exception handlers all the way down...