Logging exceptions from an external process

  • Thread starter Thread starter Ian Hannah
  • Start date Start date
I

Ian Hannah

I need to be able to launch (or attach) to another process on my machine from
my application running on the same machine.

The application needs to somehow "catch" unhandled exceptions from this
external process and provide stack trace information.

Does anyone know how this can be done?

Thanks
Ian
 
I need to be able to launch (or attach) to another process on my
machine from my application running on the same machine.

The application needs to somehow "catch" unhandled exceptions from
this external process and provide stack trace information.

Does anyone know how this can be done?

If you can spawn the process in console mode, you can capture the output
stream. If the coder threw errors to the stream, you will catch them.

Attaching is a bit harder, as you have to intercept calls. If it logs to
the event log, you cna potentially poll it for errors. Otherwise, you
don't have a lot of options unless the creator of the process provided
you something to get information from.

If everything is .NET, you can be a bit more tricky, via reflection.
This is not a direct "yes you can", but it makes things easier.

Peace and Grace,


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Back
Top