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.StartIn fo.UseShellExec ute = false;
process.StartIn fo.RedirectStan dardError = true;
process.StartIn fo.FileName = "c:\javaws.exe" ;
process.StartIn fo.Arguments = options;
process.Start() ;
}
catch (Exception exception){
Logger.WriteLog (exception.Mess age);
}
}
Is it possible? What have i missed?
--
Regards
Konrad Viltersten
----------------------------------------
May all spammers die an agonizing death;
have no burial places; their souls be
chased by demons in Gehenna from one room
to another for all eternity and beyond.
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.StartIn fo.UseShellExec ute = false;
process.StartIn fo.RedirectStan dardError = true;
process.StartIn fo.FileName = "c:\javaws.exe" ;
process.StartIn fo.Arguments = options;
process.Start() ;
}
catch (Exception exception){
Logger.WriteLog (exception.Mess age);
}
}
Is it possible? What have i missed?
--
Regards
Konrad Viltersten
----------------------------------------
May all spammers die an agonizing death;
have no burial places; their souls be
chased by demons in Gehenna from one room
to another for all eternity and beyond.
Comment