Simon,
You can't do this in a generic manner. If anything, you have to have
knowledge of the process and how to retrieve any error that occurs in the
process. The only generic way of handling an error is to use the ExitCode
property on the Process class, but even then, the return values are specific
to the application being run.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Simon" <no******@hotmail.comwrote in message
news:Oc*************@TK2MSFTNGP06.phx.gbl...
Hi everyone,
Can anyone tell me if there is a standard way of detecting an error in a
process that I've started using the .net framework's
System.Diagnostics.Process class?
I need to regularly call a secondary application but be able to tell if a
problem has occured with it and log the error (and then probably restart
it)
Can anyone tell me how to detect the error in the running process?
Thanks to anyone who can advise
Best regards
Simon