Class JKFacesExceptionHandler

java.lang.Object
jakarta.faces.context.ExceptionHandler
jakarta.faces.context.ExceptionHandlerWrapper
org.primefaces.application.exceptionhandler.PrimeExceptionHandler
com.jk.web.faces.exceptions.JKFacesExceptionHandler
All Implemented Interfaces:
jakarta.faces.event.FacesListener, jakarta.faces.event.SystemEventListener, jakarta.faces.FacesWrapper<jakarta.faces.context.ExceptionHandler>, EventListener

public class JKFacesExceptionHandler extends org.primefaces.application.exceptionhandler.PrimeExceptionHandler
This class is a handler that intercepts unhandled exceptions in the application, logs them, and provides a custom error message to the user.
Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected JKLogger
    Represents this class logger.
  • Constructor Summary

    Constructors
    Constructor
    Description
    JKFacesExceptionHandler(jakarta.faces.context.ExceptionHandler wrapped)
    This method constructs a new JKFacesExceptionHandler.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
    evaluateErrorPage(Map<String,String> errorPages, Throwable rootCause)
    void

    Methods inherited from class org.primefaces.application.exceptionhandler.PrimeExceptionHandler

    buildView, constructRedirectUrl, createExceptionInfo, findHandlerComponent, getRootCause, getWrapped, handleAjaxException, handleRedirect, isLogException, logException

    Methods inherited from class jakarta.faces.context.ExceptionHandlerWrapper

    getHandledExceptionQueuedEvent, getHandledExceptionQueuedEvents, getUnhandledExceptionQueuedEvents, isListenerForSource, processEvent

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • logger

      protected JKLogger logger
      Represents this class logger.
  • Constructor Details

    • JKFacesExceptionHandler

      public JKFacesExceptionHandler(jakarta.faces.context.ExceptionHandler wrapped)
      This method constructs a new JKFacesExceptionHandler.
      Parameters:
      wrapped - Specifies the wrapped exception handler to delegate handling to.
  • Method Details

    • handle

      public void handle() throws jakarta.faces.FacesException
      Overrides:
      handle in class org.primefaces.application.exceptionhandler.PrimeExceptionHandler
      Throws:
      jakarta.faces.FacesException
    • evaluateErrorPage

      protected String evaluateErrorPage(Map<String,String> errorPages, Throwable rootCause)
      Overrides:
      evaluateErrorPage in class org.primefaces.application.exceptionhandler.PrimeExceptionHandler