Dealing with Page Errors
Just like other.NET applications, ASP.NET applications can take advantage of exceptions to catch and handle runtime errors that occur in the code. Exceptions, though, should be just what their name suggests—that is, exceptional events in the life of the application, raised when something happens that violates an assumption. A typical bad programming practice is to rely on exceptions to catch any possible error resulting from an operation. Admittedly, wrapping a piece of code with a try/catch block makes programming much simpler while offering a single point of control for errors. However, employing this technique on a large scale can result in a dramatic loss of performance. Exceptions are meant to target exceptional events ...
Get Programming Microsoft® ASP.NET 3.5 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.