Tech and Media Labs
This site uses cookies to improve the user experience.




Exception Handling Requirements

Jakob Jenkov
Last update: 2014-05-26

The purpose of an effective exception handling strategy can be grouped into a set of primary and secondary purposes, or requirements as we like to call them in software development. The requirements state what should happen if an exception (error) occurs in an application.

The primary requirements are the most important to meet with your exception handling strategy. The secondary requirements are not nearly as important, but it is still a good idea to take these into consideration, if you have the time and opportunity in your project.

Primary Requirements

The primary requirements of an effective exception handling strategy are:

  1. The application survives the exception and can continue to process events, requests, files etc. Or, the application shuts down gracefully.
  2. The relevant parties are notified. These parties include:
    • End users
    • System operators and administrators
    • Developers
    • Customers / owners of the application
  3. The exception / error can be diagnosed and reproduced, so it can be corrected.

Secondary Requirements

The secondary goals of an effective exception handling strategy are:

  1. Encapsulation / Separation of abstraction layers.
  2. More readable, maintainable code.

Both primary and secondary requirements are explained in more detail in the following texts.

Jakob Jenkov




Copyright  Jenkov Aps
Close TOC