开发者

How to prevent application from crash if unhandled exception happened in some child thread

If I do a regular Java application then all exceptions which uncaught, get propagated in main thread and I can catch them here. However I do not see how I can use that in Android application. Let's say I have some third party library which uses some JDK 1.6 API and access to these API generates unhandled exception which crashes m开发者_StackOverflow社区y application. Since I do not have direct control of thread creations in third party libraries, I can't use Thread.UncaughtExceptionHandler. So what's way to catch such exception and notify a user without crashing application?


Just set a default exception handler for all threads

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜