Class UnknownPropertyNameException

    • Constructor Detail

      • UnknownPropertyNameException

        public UnknownPropertyNameException​(String errorCode,
                                            Object[] args)
        This constructor is used to pass the localized error message At this level, the locale of the caller is not known and it is not possible to throw localized error message at this level. Instead this constructor provides Resource Bundle name and errorCode for correctly locating the error messsage. The default getMessage() will always return English messages only. This is in consistent with current JRE
        Parameters:
        errorCode - Key to resource bundle. You can use String localizedStr = rb.getString(errorCode)
        args - arguments to message. If it is not present pass the as null be displayed according to user's preferred locale.
      • UnknownPropertyNameException

        public UnknownPropertyNameException​(String message)
        Constructs a UnknownPropertyNameException with a detailed message.
        Parameters:
        message - Exception Message. Detailed message for this exception.
    • Method Detail

      • getResourceBundleName

        public String getResourceBundleName()
        Returns resource bundle name associated with this error message.
        Specified by:
        getResourceBundleName in interface L10NMessage
        Returns:
        resource bundle name associated with this error message.
      • getErrorCode

        public String getErrorCode()
        Returns error code associated with this error message.
        Specified by:
        getErrorCode in interface L10NMessage
        Returns:
        error code associated with this error message.
      • getMessageArgs

        public Object[] getMessageArgs()
        Returns arguments for formatting this error message. You need to use MessageFormat class to format the message It can be null.
        Specified by:
        getMessageArgs in interface L10NMessage
        Returns:
        arguments for formatting this error message.
      • 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.