An Exception Handling Strategy Template

Jakob Jenkov
Last update: 2014-05-26

Now that you have seen the requirements for an exception handling strategy, and seen what elements it consists of, I will try to put together an exception handling strategy template, that you can use for your own applications.

Remember, this template may not suit your application perfectly, so make the changes you need to make to it.

The strategy template consists of the following elements:

  1. An AppException and ErrorInfo template.
  2. An explanation of how to throw the AppException.
  3. An explanation of how to propagate the AppException.
  4. An explanation of how to extract information from the ErrorInfo list inside the AppException.
  5. An explanation of how to catch and handle the AppException.

Each of these parts are described in the following texts.

Jakob Jenkov

Featured Videos











Core Software Performance Optimization Principles

Thread Congestion in Java - Video Tutorial






Advertisements

High-Performance
Java Persistence
Close TOC

All Trails

Trail TOC

Page TOC

Previous

Next