Interface ErrorMessage

All Known Implementing Classes:
ErrorMessage.InvalidParameterError, ErrorMessage.SimpleError

public interface ErrorMessage
High level interface for errors.
See Also:
  • Method Details

    • getMessage

      String getMessage()
      Returns:
      the message
    • withMessage

      static ErrorMessage withMessage(String message)
      Creates a simple ErrorMessage with a message.
      Parameters:
      message - to show to the user, or message key if using internationalization
      Returns:
      error
      Since:
      2.1.0
    • invalidParameter

      static ErrorMessage invalidParameter(String parameterName, String message)
      Creates an ErrorMessage for an invalid request parameter value.
      Parameters:
      parameterName - the parameter name
      message - the message to show to the user, or message key if using internationalization
      Returns:
      error
      Since:
      6.0.0