SeamFramework.orgCommunity Documentation

Chapter 11. Exception Handling

11.1. Qualifier

Seam Faces makes use of Solder Exception Handling, coupled with JSF2 exception handlers to provide a robust and complete means of handling exceptions that occur in a JSF application. For more information about using Solder Exception Handling, please see ???.

All exceptions that occur during the JSF life cycle should be caught by Seam Faces and passed along to Solder Exception Handling. There may be a few cases where this doesn't happen, fortunately, a Solder servlet filter acts as a catch all for exceptions and will pass along the uncaught exception.

Warning

Something that must be considered when handling an exception within the JSF life cycle is the phase in which the exception occurred. Most exceptions can be handled easily and a FacesMessage can be added and displayed to the user, or the user can be redirected to an error page. However, if the exception occurred in the RENDER_RESPONSE phase this is not the case. No redirection, or messages, or other output to the response can be used if the request is in this part of the life cycle. Please inject the FacesContext and determine the life cycle phase of the request before proceeding with exception handling.

All exceptions that are passed to Solder Exception Handling from within Seam Faces have the Faces qualifier added to them. This can aid in exception handling by limiting the exception handlers (based on qualifier) which are notified of the exception.