During an unhandled exception is there some way for me to capture the output and show an error report dialog when the application crashes?


What I'm thinking is having a small program running in the background, which only job is to listen for an abnormal exit of the main application and then show the 'report' dialog where the user could choose to email me the output of the error.

Not really sure how to implement this, or if this is the right way to do it.

Reporting the error message would be an easy task, but I have no idea how to capture the output of an unhandled exception or grab the exit codes (I'm assuming the program would give an exit code other then 0 when it crashes).

Edit
Report