I have written a utility that monitors for Unhandled Exceptions and then creates a minidump in the event that one happens.
Is there a way, when the event triggers, rather than having the standard messagebox displaying the unhandled exception, could I disable that and display my own with different information?
Thanks.
Handle the
Application.ThreadExceptionevent to show your own error messages.You can hook the event at the top of your main method like this:
And then you need the Handler method:
Edit: You can also handle the
AppDomain.UnhandledExceptionevent because certain exceptions don’t go through theThreadExceptionhandler.