未处理的异常
在 WPF 应用程序中处理未处理异常的最佳方法是什么?
What is the best way to handle an unhandled exception in a WPF application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
在 WPF 应用程序中处理未处理异常的最佳方法是什么?
What is the best way to handle an unhandled exception in a WPF application?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
您可以使用
DispatcherUnhandledException
:XAML (App.xaml):
代码隐藏 (App.xaml.cs/vb:
阅读 更多信息。不过,始终首先进行正确数量的错误处理。不要让错误溜进此方法。
You can use
DispatcherUnhandledException
:XAML (App.xaml):
Code Behind (App.xaml.cs/vb:
Read up more here. Always do the correct amount of error handling in the first place though. Don't just let errors slip into this method.