开发者

Catch every exception of program?

开发者 https://www.devze.com 2023-02-08 01:22 出处:网络
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.

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

精彩评论

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