Andy
2006-02-20 17:35:29 UTC
I am calling out to an executable using the System.Diagnostics.Process
methods and specifically attempting to trap for errors (at least trying to
learn how to trap for errors). I arranged the data to specifically error
when calling this executable.
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = "intupld.exe";
process.StartInfo.Arguments = hupFile;
process.StartInfo.WorkingDirectory = hencePath;
process.Start();
if (process.ExitCode != 0)
{
}
However: my .ExitCode is ALWAYS 0, regardless of if an error occured using
this exectable. When I run the executable from a dos prompt: I am able to
see the errors using the same file.
How would I actually be able to trap and find the errors that have occured
while running this executable?
Thanks
Andy
methods and specifically attempting to trap for errors (at least trying to
learn how to trap for errors). I arranged the data to specifically error
when calling this executable.
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileName = "intupld.exe";
process.StartInfo.Arguments = hupFile;
process.StartInfo.WorkingDirectory = hencePath;
process.Start();
if (process.ExitCode != 0)
{
}
However: my .ExitCode is ALWAYS 0, regardless of if an error occured using
this exectable. When I run the executable from a dos prompt: I am able to
see the errors using the same file.
How would I actually be able to trap and find the errors that have occured
while running this executable?
Thanks
Andy