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 Details

    • PrimeExceptionHandler

      public PrimeExceptionHandler(javax.faces.context.ExceptionHandler wrapped)
  • Method Details

    • handle

      public void handle() throws javax.faces.FacesException
      Overrides:
      handle in class javax.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:
      getRootCause in class javax.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 proper AjaxExceptionHandler for the given Throwable.
      Parameters:
      context - The FacesContext.
      rootCause - The occurred Throwable.
      Returns:
      The AjaxExceptionHandler or null.
    • 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 - The FacesContext.
      throwable - The occurred Throwable.
      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

      protected String constructRedirectUrl(javax.faces.context.FacesContext facesContext, String errorPage)
    • evaluateErrorPage

      protected String evaluateErrorPage(Map<String,String> errorPages, Throwable rootCause)