Class AuthLoginException

    • Constructor Detail

      • AuthLoginException

        @Supported
        public AuthLoginException​(Throwable nestedException)
        Constructs an AuthLoginException with given Throwable.
        Parameters:
        nestedException - Exception nested in the new exception.
      • AuthLoginException

        @Supported
        public AuthLoginException​(String message)
        Constructs a new AuthLoginException with the given message.
        Parameters:
        message - message for this exception. This message can be later retrieved by getMessage() method.
      • AuthLoginException

        @Supported
        public AuthLoginException​(String rbName,
                                  String errorCode,
                                  Object[] args,
                                  Throwable nestedException)
        Constructs an instance of AuthLoginException 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 message. The default getMessage() will always return English messages only. This is consistent with current JRE.
        Parameters:
        rbName - Resource Bundle Name to be used for getting localized error message.
        errorCode - Key to resource bundle. You can use
          ResourceBundle rb = ResourceBunde.getBundle (rbName,locale);
          String localizedStr = rb.getString(errorCode)
         
        args - arguments to message. If it is not present pass them as null
        nestedException - The nested Throwable.
      • AuthLoginException

        @Supported
        public AuthLoginException​(String rbName,
                                  String errorCode,
                                  Object[] args)
        Constructs a new AuthLoginException without a nested Throwable.
        Parameters:
        rbName - Resource Bundle Name to be used for getting localized error message.
        errorCode - Key to resource bundle. You can use
          ResourceBundle rb = ResourceBunde.getBundle (rbName,locale);
          String localizedStr = rb.getString(errorCode)
         
        args - arguments to message. If it is not present pass them as null
    • Method Detail

      • getL10NMessage

        @Supported
        public String getL10NMessage​(Locale locale)
        Returns the localized message of the given locale.
        Parameters:
        locale - the locale in which the message will be returned.
        Returns:
        String localized error message.
      • getResourceBundleName

        @Supported
        public String getResourceBundleName()
        Returns the resource bundle name.
        Returns:
        Resource Bundle Name associated with this error message.
        See Also:
        getL10NMessage(Locale)
      • getErrorCode

        @Supported
        public String getErrorCode()
        Returns the error code.
        Returns:
        Error code associated with this error message.
      • getMessageArgs

        @Supported
        public Object[] getMessageArgs()
        Returns the error message arguments.
        Returns:
        arguments for formatting this error message. You need to use MessageFormat class to format the message. It can be null.
      • getMessage

        @Supported
        public String getMessage()
        Gets messages of the exceptions including the nested exceptions.
        Overrides:
        getMessage in class Throwable
        Returns:
        messages of the exceptions including nested exceptions. The returned string is formed by concatenating messages of all the exceptions, with a new line separator, starting from this exception, all the way to the root exception, by following the nested exceptions. The message returned is always in English locale. To get localized message, use the getL10NMessage(Locale) method.