Class QueryException

    • Constructor Detail

      • QueryException

        public QueryException​(QueryException.QueryErrorCode errorCode,
                              Throwable cause,
                              String... arguments)
        Construct a QueryException.
        Parameters:
        errorCode - The error code to use for the exception message.
        cause - The Throwable that caused the error.
        arguments - Arguments used in the message associated with the error code.
        Throws:
        NullPointerException - if errorCode is null
      • QueryException

        public QueryException​(QueryException.QueryErrorCode errorCode,
                              String... arguments)
        Construct a QueryException.
        Parameters:
        errorCode - The error code to use for the exception message.
        arguments - Arguments used in the message associated with the error code.
    • Method Detail

      • getL10NMessage

        public String getL10NMessage​(Locale locale)
        Description copied from interface: L10NMessage
        Use this method to get localized error message directly.
        Specified by:
        getL10NMessage in interface L10NMessage
        Parameters:
        locale - Locale of the error message.
        Returns:
        localized error message.
      • getResourceBundleName

        public String getResourceBundleName()
        Description copied from interface: L10NMessage
        Use this method to chain this exception with another to get localized error messge use getL10NMessage method
        Specified by:
        getResourceBundleName in interface L10NMessage
        Returns:
        ResourceBundle Name associated with this error message.
      • getErrorCode

        public String getErrorCode()
        Description copied from interface: L10NMessage
        Use this method to chain this exception with another to get localized error messge use getL10NMessage method
        Specified by:
        getErrorCode in interface L10NMessage
        Returns:
        Error code associated with this error message.
      • getMessageArgs

        public Object[] getMessageArgs()
        Description copied from interface: L10NMessage
        Use this method to chain this exception with another to get localized error messge use getL10NMessage method
        Specified by:
        getMessageArgs in interface L10NMessage
        Returns:
        arguments for formatting this error message. You need to use MessageFormat class to format the message It can be null.