开发者

Catch every exception of program?

I've a WPF application which runs globally fine. But sometimes, the client tell me that he gots some crashes. But I've no information about what happened except what he does.

Is there a way to put a global try{}catch(Exception){LOGEXCEPTION; throw;} somewhere to receive all exceptions generated by a GUI action, or any other option.

Somethin开发者_如何学Cg like a "Last remedy" to log exception that we didn't manage well?

Thank you!


By handling the following events, you should be able to catch the vast majority (if not all) unhandled exceptions in your application:

  • Application.DispatcherUnhandledException
  • AppDomain.CurrentDomain.UnhandledException
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜