iOS - 全局异常处理程序

发布于 2024-10-06 06:28:21 字数 138 浏览 0 评论 0原文

无论如何,是否可以为 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

枕梦 2024-10-13 06:28:21

检查此问题寻找答案。这似乎表明您将获得垃圾堆栈跟踪,但您绝对可以设置全局异常处理程序。祝你好运!

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文