iOS - 全局异常处理程序 [英] iOS - Global exception handler
本文介绍了iOS - 全局异常处理程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有为iPhone应用程序实现一个全局异常处理程序,以使异常,而不是默默崩溃的应用程序,可以允许某种类型的消息?
因为程序可能处于不一致状态,但至少告诉用户对不起 - 出错了!
p>谢谢!解决方案
检查这个问题的答案。它似乎表明你会得到垃圾堆栈跟踪,但你肯定可以设置一个全局异常处理程序。祝你好运!
Is there anyway to implement a global exception 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!
这篇关于iOS - 全局异常处理程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文