com.opensymphony.xwork2.interceptor

Class ExceptionMappingInterceptor

    • Field Detail

      • LOG

        protected static final Logger LOG
      • categoryLogger

        protected Logger categoryLogger
      • logEnabled

        protected boolean logEnabled
      • logCategory

        protected String logCategory
      • logLevel

        protected String logLevel
    • Constructor Detail

      • ExceptionMappingInterceptor

        public ExceptionMappingInterceptor()
    • Method Detail

      • isLogEnabled

        public boolean isLogEnabled()
      • setLogEnabled

        public void setLogEnabled(boolean logEnabled)
      • getLogCategory

        public String getLogCategory()
      • setLogCategory

        public void setLogCategory(String logCatgory)
      • getLogLevel

        public String getLogLevel()
      • setLogLevel

        public void setLogLevel(String logLevel)
      • handleLogging

        protected void handleLogging(Exception e)
        Handles the logging of the exception.
        Parameters:
        e - the exception to log.
      • doLog

        protected void doLog(Logger logger,
                 Exception e)
        Performs the actual logging.
        Parameters:
        logger - the provided logger to use.
        e - the exception to log.
      • findResultFromExceptions

        protected String findResultFromExceptions(List<ExceptionMappingConfig> exceptionMappings,
                                      Throwable t)
        Deprecated. since 2.3.15 please use #findMappingFromExceptions directly instead
      • getDepth

        public int getDepth(String exceptionMapping,
                   Throwable t)
        Return the depth to the superclass matching. 0 means ex matches exactly. Returns -1 if there's no match. Otherwise, returns depth. Lowest depth wins.
        Parameters:
        exceptionMapping - the mapping classname
        t - the cause
        Returns:
        the depth, if not found -1 is returned.
      • publishException

        protected void publishException(ActionInvocation invocation,
                            ExceptionHolder exceptionHolder)
        Default implementation to handle ExceptionHolder publishing. Pushes given ExceptionHolder on the stack. Subclasses may override this to customize publishing.
        Parameters:
        invocation - The invocation to publish Exception for.
        exceptionHolder - The exceptionHolder wrapping the Exception to publish.

Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.