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

Java Generics

Java ForkJoinPool

P2P Networks Introduction



















Close TOC
All Tutorial Trails
All Trails
Table of contents (TOC) for this tutorial trail
Trail TOC
Table of contents (TOC) for this tutorial
Page TOC
Previous tutorial in this tutorial trail
Previous
Next tutorial in this tutorial trail
Next