public class ExceptionHandlerImpl
extends javax.faces.context.ExceptionHandler
The default implementation of ExceptionHandler for JSF 2.0.
As an implementation note, if changes going forward are required here,
review the ExceptionHandler implementation within
javax.faces.webapp.PreJsf2ExceptionHandlerFactory. The code
is, in most cases, quite similar.
| Modifier and Type | Field and Description |
|---|---|
static Level |
INCIDENT_ERROR |
| Constructor and Description |
|---|
ExceptionHandlerImpl() |
ExceptionHandlerImpl(boolean errorPagePresent) |
| Modifier and Type | Method and Description |
|---|---|
javax.faces.event.ExceptionQueuedEvent |
getHandledExceptionQueuedEvent()
Return the first
|
Iterable<javax.faces.event.ExceptionQueuedEvent> |
getHandledExceptionQueuedEvents()
The default implementation must
return an |
Throwable |
getRootCause(Throwable t)
Unwrap the argument |
Iterable<javax.faces.event.ExceptionQueuedEvent> |
getUnhandledExceptionQueuedEvents()
Return an |
void |
handle()
Take action to handle the
|
boolean |
isListenerForSource(Object source)
This method must return
true if and only if this
listener instance is interested in receiving events from the
instance referenced by the source parameter. |
void |
processEvent(javax.faces.event.SystemEvent event)
When called, the listener can assume that any guarantees given
in the javadoc for the specific
SystemEvent
subclass are true. |
public static final Level INCIDENT_ERROR
public ExceptionHandlerImpl()
public ExceptionHandlerImpl(boolean errorPagePresent)
public javax.faces.event.ExceptionQueuedEvent getHandledExceptionQueuedEvent()
javax.faces.context.ExceptionHandlerReturn the first
ExceptionQueuedEvent handled by this handler.
getHandledExceptionQueuedEvent in class javax.faces.context.ExceptionHandlerExceptionQueuedEvent.public void handle()
throws javax.faces.FacesException
javax.faces.context.ExceptionHandlerTake 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.
handle in class javax.faces.context.ExceptionHandlerjavax.faces.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.ExceptionHandler.handle()public boolean isListenerForSource(Object source)
javax.faces.context.ExceptionHandlerThis method must return true if and only if this
listener instance is interested in receiving events from the
instance referenced by the source parameter.
isListenerForSource in interface javax.faces.event.SystemEventListenerisListenerForSource in class javax.faces.context.ExceptionHandlersource - the source that is inquiring about the
appropriateness of sending an event to this listener instance.ExceptionHandler.isListenerForSource(Object)public void processEvent(javax.faces.event.SystemEvent event)
throws javax.faces.event.AbortProcessingException
javax.faces.context.ExceptionHandlerWhen called, the listener can assume that any guarantees given
in the javadoc for the specific SystemEvent
subclass are true.
processEvent in interface javax.faces.event.SystemEventListenerprocessEvent in class javax.faces.context.ExceptionHandlerevent - the SystemEvent instance that
is being processed.javax.faces.event.AbortProcessingException - if lifecycle processing should
cease for this request.ExceptionHandler.processEvent(javax.faces.event.SystemEvent)public Throwable getRootCause(Throwable t)
javax.faces.context.ExceptionHandlerUnwrap the argument t
until the unwrapping encounters an Object whose
getClass() is not equal to
FacesException.class or
javax.el.ELException.class. If there is no root cause, null is returned.
getRootCause in class javax.faces.context.ExceptionHandlert - passed-in wrapped Throwable.ExceptionHandler.getRootCause(Throwable)public Iterable<javax.faces.event.ExceptionQueuedEvent> getUnhandledExceptionQueuedEvents()
javax.faces.context.ExceptionHandlerReturn an Iterable over
all ExceptionQueuedEvents that have not yet been handled
by the ExceptionHandler.handle() method.
getUnhandledExceptionQueuedEvents in class javax.faces.context.ExceptionHandlerExceptionQueuedEvents.ExceptionHandler.getUnhandledExceptionQueuedEvents()public Iterable<javax.faces.event.ExceptionQueuedEvent> getHandledExceptionQueuedEvents()
javax.faces.context.ExceptionHandlerThe default implementation must
return an Iterable over all
ExceptionQueuedEvents that have been handled by the ExceptionHandler.handle() method.
getHandledExceptionQueuedEvents in class javax.faces.context.ExceptionHandlerIterable over all ExceptionQueuedEvents.ExceptionHandler.getHandledExceptionQueuedEvents()Copyright © 2010–2019 JBoss by Red Hat. All rights reserved.