K
K Viltersten
I've developed a service and protected it's
contents from presenting the potential error
messages by a number of try-catch statements,
especially a general, top level try-catch.
When i run it, i sometimes get errors to the
screen anyway, which depends (i suspect) on
the fact that i execute external EXE's. How
can i make perfectly sure not to show
anything to the screen but report all
exceptions back to the try-catch so i can
log them? I've done the following.
public void RunMe(){
Process process = null;
try{
process = new Process();
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.FileName = "c:\javaws.exe";
process.StartInfo.Arguments = options;
process.Start();
}
catch (Exception exception){
Logger.WriteLog(exception.Message);
}
}
Is it possible? What have i missed?
contents from presenting the potential error
messages by a number of try-catch statements,
especially a general, top level try-catch.
When i run it, i sometimes get errors to the
screen anyway, which depends (i suspect) on
the fact that i execute external EXE's. How
can i make perfectly sure not to show
anything to the screen but report all
exceptions back to the try-catch so i can
log them? I've done the following.
public void RunMe(){
Process process = null;
try{
process = new Process();
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.FileName = "c:\javaws.exe";
process.StartInfo.Arguments = options;
process.Start();
}
catch (Exception exception){
Logger.WriteLog(exception.Message);
}
}
Is it possible? What have i missed?