public class AuthLoginException extends LoginException implements L10NMessage
Constructor and Description |
---|
AuthLoginException(String message)
Constructs a new
AuthLoginException with the given
message. |
AuthLoginException(String rbName,
String errorCode,
Object[] args)
Constructs a new
AuthLoginException without a nested
Throwable . |
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. |
AuthLoginException(String message,
Throwable nestedException)
Constructs an exception with given message and the nested exception.
|
AuthLoginException(Throwable nestedException)
Constructs an
AuthLoginException with given
Throwable . |
Modifier and Type | Method and Description |
---|---|
String |
getErrorCode()
Returns the error code.
|
String |
getL10NMessage(Locale locale)
Returns the localized message of the given locale.
|
String |
getMessage()
Gets messages of the exceptions including the nested exceptions.
|
Object[] |
getMessageArgs()
Returns the error message arguments.
|
String |
getResourceBundleName()
Returns the resource bundle name.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public AuthLoginException(String message, Throwable nestedException)
message
- message of this exceptionnestedException
- Exception caught by the code block throwing this exceptionpublic AuthLoginException(Throwable nestedException)
AuthLoginException
with given
Throwable
.nestedException
- Exception nested in the new exception.public AuthLoginException(String message)
AuthLoginException
with the given
message.message
- message for this exception. This message can be later
retrieved by getMessage()
method.public AuthLoginException(String rbName, String errorCode, Object[] args, Throwable nestedException)
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.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 nullnestedException
- The nested Throwable
.public AuthLoginException(String rbName, String errorCode, Object[] args)
AuthLoginException
without a nested
Throwable
.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 nullpublic String getL10NMessage(Locale locale)
getL10NMessage
in interface L10NMessage
locale
- the locale in which the message will be returned.public String getResourceBundleName()
getResourceBundleName
in interface L10NMessage
getL10NMessage(java.util.Locale).
public String getErrorCode()
getErrorCode
in interface L10NMessage
public Object[] getMessageArgs()
getMessageArgs
in interface L10NMessage
MessageFormat
class to format the message. It can
be null.public String getMessage()
getMessage
in interface L10NMessage
getMessage
in class Throwable
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.