iOS - 全局异常处理程序
无论如何,是否可以为 iPhone 应用程序实现一个全局异常处理程序,以便异常情况可以允许某种消息,而不是默默地使应用程序崩溃?
我可以理解如果它不可行,因为程序可能处于不一致的状态,但至少告诉用户“抱歉 - 出了问题!”
谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查此问题寻找答案。这似乎表明您将获得垃圾堆栈跟踪,但您绝对可以设置全局异常处理程序。祝你好运!
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!