How to catch all exceptions?



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?

--
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.


.



Relevant Pages

  • How to try and catch a warning ?
    ... If there is a potential error, I can use try-catch. ... But what if I want to do special handling in case of warnings? ...
    (comp.soft-sys.matlab)
  • Re: GDI+ error with lots of PictureBoxes
    ... be no automated way of finding out which ones will fail" ... exception - same as automated way to find "bad" gifs. ... If it goes have more than one frame, then inside a try-catch block ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How do you guys handle errors from class libraries?
    ... > back up to the client. ... If you have no try-catch around any of the calling ... > When an exception is thrown by the runtime ... > cases you want clean-up code to dispose objects etc when an exception is ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Use Try-Catch or If Statement?
    ... try-catch statements are to be used to handle exceptional cases and not ... we should rely on an exception to return a result. ... Public Function ExistsAs Boolean ... Dim bReturn as Boolean = False ...
    (microsoft.public.dotnet.languages.vb)
  • Re: perf & Try Catch
    ... The cost of the exception itself only occurs when it is ... > try-catch or try-finally gets JITd (the runtime uses this to determine ... >>> small perf hit in the catch block when the exception is caught because ...
    (microsoft.public.dotnet.languages.csharp)