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
-
Method Summary
Modifier and TypeMethodDescriptionprotected Throwable
Builds the view if not already available.protected String
constructRedirectUrl
(javax.faces.context.FacesContext facesContext, String errorPage) protected ExceptionInfo
createExceptionInfo
(Throwable rootCause) protected String
evaluateErrorPage
(Map<String, String> errorPages, Throwable rootCause) protected AjaxExceptionHandler
findHandlerComponent
(javax.faces.context.FacesContext context, Throwable rootCause) Finds the properAjaxExceptionHandler
for the givenThrowable
.getRootCause
(Throwable throwable) void
handle()
protected void
handleAjaxException
(javax.faces.context.FacesContext context, Throwable rootCause, ExceptionInfo info) protected void
handleRedirect
(javax.faces.context.FacesContext context, Throwable rootCause, ExceptionInfo info, boolean isResponseReset) protected boolean
isLogException
(javax.faces.context.FacesContext context, Throwable rootCause) protected void
logException
(Throwable rootCause) Methods inherited from class javax.faces.context.ExceptionHandlerWrapper
getHandledExceptionQueuedEvent, getHandledExceptionQueuedEvents, getUnhandledExceptionQueuedEvents, getWrapped, isListenerForSource, processEvent
-
Constructor Details
-
PrimeExceptionHandler
public PrimeExceptionHandler(javax.faces.context.ExceptionHandler wrapped)
-
-
Method Details
-
handle
public void handle() throws javax.faces.FacesException- Overrides:
handle
in classjavax.faces.context.ExceptionHandlerWrapper
- Throws:
javax.faces.FacesException
-
logException
-
isLogException
-
getRootCause
- Overrides:
getRootCause
in 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 properAjaxExceptionHandler
for the givenThrowable
.- Parameters:
context
- TheFacesContext
.rootCause
- The occurredThrowable
.- Returns:
- The
AjaxExceptionHandler
ornull
.
-
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
-