ExceptionHandler is the
central point for handling unexpectedExceptions that are thrown during the Faces
lifecycle. The ExceptionHandler must not be notified of
any Exceptions that occur during application startup or
shutdown.

See the specification prose document for the requirements for the
default implementation. Exceptions may be passed to the
ExceptionHandler in one of two ways:

by ensuring that Exceptions are not caught, or
are caught and re-thrown.

This approach allows the ExceptionHandler
facility specified in section JSF.6.2 to operate on the
Exception.

Because the Exception must not be re-thrown
when using this approach, lifecycle processing may continue
as normal, allowing more Exceptions to be
published if necessary.

With either approach, any ExceptionQueuedEvent instances
that are published in this way are accessible to the handle()
method, which is called at the end of each lifecycle phase, as
specified in section JSF.6.2.

Constructor Detail

ExceptionHandler

Method Detail

handle

Take action to handle the
Exception instances residing inside the ExceptionQueuedEvent instances that have been queued by calls to
Application().publishEvent(ExceptionQueuedEvent.class,
eventContext). The requirements of the default
implementation are detailed in section JSF.6.2.1.

Throws:

FacesException - if and only if a problem occurs while
performing the algorithm to handle the Exception, not
as a means of conveying a handled Exception itself.