Exception handling in object-oriented languages is messy, because we are trying to do four different things with one object.

  • One is to try to determine how to process the exception (in the catch clauses).
  • Another is to eventually present the exception to the user (getMessage(), getLocalizedMessage()).
  • Another is to add information passed to the caller (adding attributes by subclassing).
  • And, another is to represent the cause of the exception for the developer (for debugging).

The Requirements

Contents

Background

Review of Exception Handling Basics

The Requirements

The Three-tiered Exception Handling Architecture

Summary