8
Catching Exceptions with Exception Handling
We always try to make our code as stable as possible when building web applications, but there are times when we can’t catch everything. This is why exceptions are considered a foundational part of development. Exception handling is essential for preventing web applications from crashing and displaying an ugly error message on a page. It’s tempting to wrap everything with try/catch or try/finally statements and move on. This should be avoided. Coding with try/catch/finally statements in an application should be the exception to the rule.
The common coding standards in this chapter are meant to remove those types of scenarios and provide a better developer experience.
In this chapter, we’ll examine ...
Get ASP.NET 8 Best Practices 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.