- All Implemented Interfaces:
FacesListener,SystemEventListener,EventListener
The default implementation of ExceptionHandler for Faces.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the firstExceptionQueuedEventhandled by this handler.The default implementation must return anIterableover allExceptionQueuedEvents that have been handled by theExceptionHandler.handle()method.Unwrap the argumenttuntil the unwrapping encounters an Object whosegetClass()is not equal toFacesException.classorjakarta.el.ELException.class.Return anIterableover allExceptionQueuedEvents that have not yet been handled by theExceptionHandler.handle()method.voidhandle()Take action to handle theExceptioninstances residing inside theExceptionQueuedEventinstances that have been queued by calls toApplication().publishEvent(ExceptionQueuedEvent.class, eventContext).booleanisListenerForSource(Object source) This method must returntrueif and only if this listener instance is interested in receiving events from the instance referenced by thesourceparameter.voidprocessEvent(SystemEvent event) When called, the listener can assume that any guarantees given in the javadoc for the specificSystemEventsubclass are true.
-
Field Details
-
INCIDENT_ERROR
-
-
Constructor Details
-
ExceptionHandlerImpl
public ExceptionHandlerImpl() -
ExceptionHandlerImpl
public ExceptionHandlerImpl(boolean errorPagePresent)
-
-
Method Details
-
getHandledExceptionQueuedEvent
Description copied from class:ExceptionHandlerReturn the first
ExceptionQueuedEventhandled by this handler.- Specified by:
getHandledExceptionQueuedEventin classExceptionHandler- Returns:
- instance of
ExceptionQueuedEvent.
-
handle
Description copied from class:ExceptionHandlerTake action to handle the
Exceptioninstances residing inside theExceptionQueuedEventinstances that have been queued by calls toApplication().publishEvent(ExceptionQueuedEvent.class, eventContext). The requirements of the default implementation are detailed in section 6.2.1 "Default ExceptionHandler implementation" of the Jakarta Faces Specification Document.- Specified by:
handlein classExceptionHandler- Throws:
FacesException- if and only if a problem occurs while performing the algorithm to handle theException, not as a means of conveying a handledExceptionitself.- See Also:
-
isListenerForSource
Description copied from class:ExceptionHandlerThis method must return
trueif and only if this listener instance is interested in receiving events from the instance referenced by thesourceparameter.- Specified by:
isListenerForSourcein interfaceSystemEventListener- Specified by:
isListenerForSourcein classExceptionHandler- Parameters:
source- the source that is inquiring about the appropriateness of sending an event to this listener instance.- Returns:
- the value as specified above
- See Also:
-
processEvent
Description copied from class:ExceptionHandlerWhen called, the listener can assume that any guarantees given in the javadoc for the specific
SystemEventsubclass are true.- Specified by:
processEventin interfaceSystemEventListener- Specified by:
processEventin classExceptionHandler- Parameters:
event- theSystemEventinstance that is being processed.- Throws:
AbortProcessingException- if lifecycle processing should cease for this request.- See Also:
-
getRootCause
Description copied from class:ExceptionHandlerUnwrap the argument
tuntil the unwrapping encounters an Object whosegetClass()is not equal toFacesException.classorjakarta.el.ELException.class. If there is no root cause,nullis returned.- Specified by:
getRootCausein classExceptionHandler- Parameters:
t- passed-in wrappedThrowable.- Returns:
- unwrapped object.
- See Also:
-
getUnhandledExceptionQueuedEvents
Description copied from class:ExceptionHandlerReturn an
Iterableover allExceptionQueuedEvents that have not yet been handled by theExceptionHandler.handle()method.- Specified by:
getUnhandledExceptionQueuedEventsin classExceptionHandler- Returns:
- the unhandled set of
ExceptionQueuedEvents. - See Also:
-
getHandledExceptionQueuedEvents
Description copied from class:ExceptionHandlerThe default implementation must return an
Iterableover allExceptionQueuedEvents that have been handled by theExceptionHandler.handle()method.- Specified by:
getHandledExceptionQueuedEventsin classExceptionHandler- Returns:
- an
Iterableover allExceptionQueuedEvents. - See Also:
-