How to catch exceptions from another program (for logging)?

Posted by CuriousCoder on Stack Overflow See other posts from Stack Overflow or by CuriousCoder
Published on 2010-03-20T10:43:47Z Indexed on 2010/03/20 10:51 UTC
Read the original article Hit count: 266

Filed under:
|
|
|

I am working on a tool that monitors a number of applications and ensures they are always running and in a clean state. Some of these applications have unhandled exceptions which do occur periodically and present the 'send crash report' window. I do not have the source code to these applications.

Is there any mechanism I could use to catch the exceptions, or simply identify their exception type, as well as identify the application's main executable file that threw the exception.

I'm not trying to do anything crazy like catch and handle it on the applications behalf, I'm simply trying to capture the exception type, log it and then restart the application.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about winapi