Reputation: 4107
Is it possible to handle exceptions on the AppDomain.CurrentDomain.UnhandledException callback? I want to do the following:
Can this be done?
Upvotes: 5
Views: 6055
Reputation: 11854
Hope this link helps:
http://www.switchonthecode.com/tutorials/csharp-tutorial-dealing-with-unhandled-exceptions
As the code shows, just listen to the exception and do what you want when it happens.
Upvotes: 2
Reputation: 57936
You could to use Application.SetUnhandledExceptionMode
method.
Please, take also a look here: User Friendly Exception Handling.
Upvotes: 2