开发者

iOS - Global exception handler

开发者 https://www.devze.com 2023-01-28 20:14 出处:网络
Is there anyway to implement a global except开发者_C百科ion handler for iPhone apps such that exceptions, instead of silently crashing the app, could allow for some sort of message?

Is there anyway to implement a global except开发者_C百科ion handler for iPhone apps such that exceptions, instead of silently crashing the app, could allow for some sort of message?

I can understand if it's not do-able since the program may be in an inconsistent state, but it'd be nice to at least tell users "Sorry - something went wrong!"

Thanks!


Check this question for the answer. It seems to indicate that you'll be getting junky stack traces, but you definitely can set a global exception handler. Good luck!

0

精彩评论

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