Class GenericExceptionMessageFormatter


  • public class GenericExceptionMessageFormatter
    extends AbstractExceptionMessageFormatter
    Exception message formatter which defines a message based on the configuration properties.

    If the exception is present in the configuration then original message is forwarded like for ForwardExceptionMessageFormatter.

    Otherwise generic message is returned as defined by configuration property.

    If there is no configuration property defined then generic message defined in this class is returned.

    • Field Detail

      • DEFAULT_EXCEPTION_MESSAGE

        protected static final java.lang.String DEFAULT_EXCEPTION_MESSAGE
        See Also:
        Constant Field Values
    • Constructor Detail

      • GenericExceptionMessageFormatter

        public GenericExceptionMessageFormatter​(FallbackConfigurationHelper fallbackConfigurationHelper)
        Creates a new generic message formatter with given fallback configuration helper.
        Parameters:
        fallbackConfigurationHelper - fallback configuration helper
    • Method Detail

      • formatMessage

        protected java.lang.String formatMessage​(java.lang.String extensionName,
                                                 java.lang.Exception exception,
                                                 ErrorWsDTO errorWsDTO)
        Description copied from class: AbstractExceptionMessageFormatter
        Formats exception message.
        Specified by:
        formatMessage in class AbstractExceptionMessageFormatter
        Parameters:
        extensionName - extension name
        exception - exception object
        errorWsDTO - webservices error object for which message is formatted
        Returns:
        formatted message