Top Description Fields Constructors Methods
com.sun.faces.context

public Class AjaxExceptionHandlerImpl

extends ExceptionHandlerWrapper
Class Inheritance
Imports
java.io.IOException, java.util.Collections, .Iterator, .LinkedList, java.util.logging.Level, .Logger, com.sun.faces.RIConstants, com.sun.faces.util.FacesLogger, jakarta.faces.FacesException, jakarta.faces.application.ProjectStage, jakarta.faces.component.UIComponent, jakarta.faces.context.ExceptionHandler, .ExceptionHandlerWrapper, .ExternalContext, .FacesContext, .PartialResponseWriter, jakarta.faces.event.AbortProcessingException, .ExceptionQueuedEvent, .ExceptionQueuedEventContext, .PhaseId, .SystemEvent

A specialized implementation of ExceptionHandler for Faces that handles exceptions by writing error information to the partial response.

Field Summary

Modifier and TypeField and Description
private ExceptionQueuedEvent
private LinkedList<ExceptionQueuedEvent>
private static final String
private static final String
private static final String
private static final Logger
private LinkedList<ExceptionQueuedEvent>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ExceptionQueuedEvent
public Iterable<ExceptionQueuedEvent>
private String
getLoggingKey(boolean beforePhase, boolean afterPhase)

public Iterable<ExceptionQueuedEvent>
public void
handle()

Overrides jakarta.faces.context.ExceptionHandlerWrapper.handle.

The default behavior of this method is to call jakarta.faces.context.ExceptionHandler#handle() on the wrapped ExceptionHandler object.

private void
private boolean
private void
log(ExceptionQueuedEventContext exceptionContext)

public void
Inherited from jakarta.faces.context.ExceptionHandlerWrapper:
getRootCausegetWrappedisListenerForSource

Field Detail

handledback to summary
private ExceptionQueuedEvent handled
handledExceptionsback to summary
private LinkedList<ExceptionQueuedEvent> handledExceptions
LOG_AFTER_KEYback to summary
private static final String LOG_AFTER_KEY
LOG_BEFORE_KEYback to summary
private static final String LOG_BEFORE_KEY
LOG_KEYback to summary
private static final String LOG_KEY
LOGGERback to summary
private static final Logger LOGGER
unhandledExceptionsback to summary
private LinkedList<ExceptionQueuedEvent> unhandledExceptions

Constructor Detail

AjaxExceptionHandlerImplback to summary
public AjaxExceptionHandlerImpl(ExceptionHandler handler)

Method Detail

getHandledExceptionQueuedEventback to summary
public ExceptionQueuedEvent getHandledExceptionQueuedEvent()

Overrides jakarta.faces.context.ExceptionHandlerWrapper.getHandledExceptionQueuedEvent.

Doc from jakarta.faces.context.ExceptionHandlerWrapper.getHandledExceptionQueuedEvent.

The default behavior of this method is to call ExceptionHandler#getHandledExceptionQueuedEvent() on the wrapped ExceptionHandler object.

Returns:ExceptionQueuedEvent

Doc from jakarta.faces.context.ExceptionHandler.getHandledExceptionQueuedEvent.

instance of ExceptionQueuedEvent.

Annotations
@Override
See Also
ExceptionHandler#getHandledExceptionQueuedEvent()
getHandledExceptionQueuedEventsback to summary
public Iterable<ExceptionQueuedEvent> getHandledExceptionQueuedEvents()

Overrides jakarta.faces.context.ExceptionHandlerWrapper.getHandledExceptionQueuedEvents.

Doc from jakarta.faces.context.ExceptionHandlerWrapper.getHandledExceptionQueuedEvents.

The default behavior of this method is to call ExceptionHandler#getHandledExceptionQueuedEvents() on the wrapped ExceptionHandler object.

Returns:Iterable<ExceptionQueuedEvent>

Doc from jakarta.faces.context.ExceptionHandler.getHandledExceptionQueuedEvents.

an Iterable over all ExceptionQueuedEvents.

Annotations
@Override
See Also
jakarta.faces.context.ExceptionHandlerWrapper#getHandledExceptionQueuedEvents()
getLoggingKeyback to summary
private String getLoggingKey(boolean beforePhase, boolean afterPhase)
getUnhandledExceptionQueuedEventsback to summary
public Iterable<ExceptionQueuedEvent> getUnhandledExceptionQueuedEvents()

Overrides jakarta.faces.context.ExceptionHandlerWrapper.getUnhandledExceptionQueuedEvents.

Doc from jakarta.faces.context.ExceptionHandlerWrapper.getUnhandledExceptionQueuedEvents.

The default behavior of this method is to call ExceptionHandler#getUnhandledExceptionQueuedEvents() on the wrapped ExceptionHandler object.

Returns:Iterable<ExceptionQueuedEvent>

Doc from jakarta.faces.context.ExceptionHandler.getUnhandledExceptionQueuedEvents.

the unhandled set of ExceptionQueuedEvents.

Annotations
@Override
See Also
jakarta.faces.context.ExceptionHandlerWrapper#getUnhandledExceptionQueuedEvents()
handleback to summary
public void handle() throws FacesException

Overrides jakarta.faces.context.ExceptionHandlerWrapper.handle.

Doc from jakarta.faces.context.ExceptionHandlerWrapper.handle.

The default behavior of this method is to call jakarta.faces.context.ExceptionHandler#handle() on the wrapped ExceptionHandler object.

Annotations
@Override
Exceptions
FacesException:

Doc from jakarta.faces.context.ExceptionHandler.handle.

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.

See Also
jakarta.faces.context.ExceptionHandlerWrapper#handle()
handlePartialResponseErrorback to summary
private void handlePartialResponseError(FacesContext context, Throwable t)
isRethrownback to summary
private boolean isRethrown(Throwable t)
logback to summary
private void log(ExceptionQueuedEventContext exceptionContext)
processEventback to summary
public void processEvent(SystemEvent event) throws AbortProcessingException

Overrides jakarta.faces.context.ExceptionHandlerWrapper.processEvent.

Implements jakarta.faces.event.SystemEventListener.processEvent.

Doc from jakarta.faces.context.ExceptionHandlerWrapper.processEvent.

The default behavior of this method is to call jakarta.faces.context.ExceptionHandler#processEvent(jakarta.faces.event.SystemEvent) on the wrapped ExceptionHandler object.

Parameters
event:SystemEvent

Doc from jakarta.faces.event.SystemEventListener.processEvent.

the SystemEvent instance that is being processed.

Annotations
@Override
Exceptions
AbortProcessingException:

Doc from jakarta.faces.event.SystemEventListener.processEvent.

if lifecycle processing should cease for this request.

See Also
jakarta.faces.context.ExceptionHandlerWrapper#processEvent(jakarta.faces.event.SystemEvent)