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 Constructor Description PrimeExceptionHandler(javax.faces.context.ExceptionHandler wrapped)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ThrowablebuildView(javax.faces.context.FacesContext context, Throwable throwable, Throwable rootCause)Builds 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.ThrowablegetRootCause(Throwable throwable)javax.faces.context.ExceptionHandlergetWrapped()voidhandle()protected voidhandleAjaxException(javax.faces.context.FacesContext context, Throwable rootCause, ExceptionInfo info)protected voidhandleRedirect(javax.faces.context.FacesContext context, Throwable rootCause, ExceptionInfo info, boolean responseResetted)protected booleanisLogException(javax.faces.context.FacesContext context, Throwable rootCause)protected voidlogException(Throwable rootCause)
-
-
-
Method Detail
-
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
protected void logException(Throwable rootCause)
-
isLogException
protected boolean isLogException(javax.faces.context.FacesContext context, Throwable rootCause)
-
getRootCause
public Throwable getRootCause(Throwable throwable)
- Overrides:
getRootCausein classjavax.faces.context.ExceptionHandlerWrapper
-
handleAjaxException
protected void handleAjaxException(javax.faces.context.FacesContext context, Throwable rootCause, ExceptionInfo info) throws IOException- Throws:
IOException
-
createExceptionInfo
protected ExceptionInfo createExceptionInfo(Throwable rootCause) throws IOException
- 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 responseResetted) throws IOException- Throws:
IOException
-
constructRedirectUrl
protected String constructRedirectUrl(javax.faces.context.FacesContext facesContext, String errorPage)
-
-