Class PrimeExceptionHandler
java.lang.Object
javax.faces.context.ExceptionHandler
javax.faces.context.ExceptionHandlerWrapper
org.primefaces.application.exceptionhandler.PrimeExceptionHandler
- All Implemented Interfaces:
EventListener,javax.faces.event.FacesListener,javax.faces.event.SystemEventListener,javax.faces.FacesWrapper<javax.faces.context.ExceptionHandler>
public class PrimeExceptionHandler
extends javax.faces.context.ExceptionHandlerWrapper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ThrowableBuilds the view if not already available.protected StringconstructRedirectUrl(javax.faces.context.FacesContext facesContext, String errorPage) protected ExceptionInfocreateExceptionInfo(Throwable rootCause) protected StringevaluateErrorPage(Map<String, String> errorPages, Throwable rootCause) protected AjaxExceptionHandlerfindHandlerComponent(javax.faces.context.FacesContext context, Throwable rootCause) Finds the properAjaxExceptionHandlerfor the givenThrowable.getRootCause(Throwable throwable) javax.faces.context.ExceptionHandlervoidhandle()protected voidhandleAjaxException(javax.faces.context.FacesContext context, Throwable rootCause, ExceptionInfo info) protected voidhandleRedirect(javax.faces.context.FacesContext context, Throwable rootCause, ExceptionInfo info, boolean isResponseReset) protected booleanisLogException(javax.faces.context.FacesContext context, Throwable rootCause) protected voidlogException(Throwable rootCause) Methods inherited from class javax.faces.context.ExceptionHandlerWrapper
getHandledExceptionQueuedEvent, getHandledExceptionQueuedEvents, getUnhandledExceptionQueuedEvents, isListenerForSource, processEvent
-
Constructor Details
-
PrimeExceptionHandler
public PrimeExceptionHandler(javax.faces.context.ExceptionHandler wrapped)
-
-
Method Details
-
getWrapped
public javax.faces.context.ExceptionHandler getWrapped()- Specified by:
getWrappedin interfacejavax.faces.FacesWrapper<javax.faces.context.ExceptionHandler>- Overrides:
getWrappedin classjavax.faces.context.ExceptionHandlerWrapper
-
handle
public void handle() throws javax.faces.FacesException- Overrides:
handlein classjavax.faces.context.ExceptionHandlerWrapper- Throws:
javax.faces.FacesException
-
logException
-
isLogException
-
getRootCause
- Overrides:
getRootCausein classjavax.faces.context.ExceptionHandlerWrapper
-
handleAjaxException
protected void handleAjaxException(javax.faces.context.FacesContext context, Throwable rootCause, ExceptionInfo info) throws IOException - Throws:
IOException
-
createExceptionInfo
- Throws:
IOException
-
findHandlerComponent
protected AjaxExceptionHandler findHandlerComponent(javax.faces.context.FacesContext context, Throwable rootCause) Finds the properAjaxExceptionHandlerfor the givenThrowable.- Parameters:
context- TheFacesContext.rootCause- The occurredThrowable.- Returns:
- The
AjaxExceptionHandlerornull.
-
buildView
protected Throwable buildView(javax.faces.context.FacesContext context, Throwable throwable, Throwable rootCause) throws IOException Builds the view if not already available. This is mostly required for ViewExpiredException's.- Parameters:
context- TheFacesContext.throwable- The occurredThrowable.rootCause- The root cause.- Returns:
- The unwrapped
Throwable. - Throws:
IOException- If building the view fails.
-
handleRedirect
protected void handleRedirect(javax.faces.context.FacesContext context, Throwable rootCause, ExceptionInfo info, boolean isResponseReset) throws IOException - Throws:
IOException
-
constructRedirectUrl
-
evaluateErrorPage
-