ChInKPoInt [No MCSD] wrote:
I am using Visual Studio 2K3 writing a ASP.NET web application. Is there a
way to force the C# compiler to catch possible exception?
In Java, all exceptions thrown MUST BE caught, otherwise compiler would give
you error. In C#, is there a way to do that?
There is no way to do exactly this... don`t know if this is your
intention, but if what you want to to never show an exception to the
user you can use Global.asax and httpapplication events to catch
exceptions globally. You can also use that option in web.config to send
the user to a "error" page if an unhandled exception occours.