- Exception Handling Strategies
- Exception Handling Strategy - Overview
- Exception Handling Requirements
- Application Survival
- Notifying Relevant Parties
- Error Diagnostics and Reproduction
- Separation of Abstraction Layers
- More Readable and Maintainable Code
- Error Location and Context
- Error Causes, Types and Reactions
- Strategy Elements
- Error Detection
- Error Information Gathering
- Throwing Exceptions
- Propagating Exceptions
- Catching Exceptions
- An Exception Handling Strategy Template
- An Exception Class Template
- Throwing the AppException
- Propagating the AppException
- The ErrorInfo List
- Catching the AppException
- Avoid Exception Hierarchies
An exception handling strategy typically consists of the following elements:
- Error detection
- Error information gathering
- Throwing the exception
- Propagating the exception, possibly adding context information to it.
- Catching and reacting to the exception:
- Retrying the action, if possible.
- Notifying relevant parties.
I will talk a bit about each of these elements in the following pages.