Perform Exception Handling in .NET Exceptionally

Wednesday Nov 10th 2004 by Staff

This month, .NET Nuts & Bolts covers exception handling, examining what exceptions are and why they are important. You'll learn how to use them, how to create custom exceptions, and how to apply common best practices.


An exception is an error condition or unexpected behavior that occurs within an application. Exceptions can occur from within classes in the Microsoft .NET Framework or other classes you use. You also can raise them in your own code. Exceptions can result from various conditions, such as the following:

  • Attempting to access a null object's property or method
  • Indexing into an array location that is out of bounds
  • Trying to access an unavailable system resource
  • Executing an invalid SQL statement against a database

When such conditions occur, the offending code throws (or raises) an exception. The exception is passed back up the calling stack until it is handled (or caught), or the application terminates due to the unhandled exception.

The article continues at

Mobile Site | Full Site
Copyright 2017 © QuinStreet Inc. All Rights Reserved