Get the Crash Info from user[.NET]
When my application crashed, I want to get the crash infomatin from the user,so i wander how to get the crash info from the user?And how to handle the exceptions when th开发者_开发问答e main application crashed?
ps.Just like that window:"Would you like to send the crash info to Microsoft?"What you need to do is catch all uncaught exceptions for the application.
The AppDomain.CurrentDomain.UnhandledException
event handler allows you to add an event handler for all uncaught exceptions. With the exception you receive with this event, you can show the dialog you want.
See articles like Why is .NET exception not caught by try/catch block? on how to catch all exceptions.
精彩评论