Logging exceptions from an external process

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
 
G

Gregory A. Beamer

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! |
*******************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top