public class AuthLoginException extends LoginException
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(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(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)
locale
- the locale in which the message will be returned.public String getResourceBundleName()
AuthLoginException.getL10NMessage(Locale)
public String getErrorCode()
public Object[] getMessageArgs()
MessageFormat
class to format the message. It can
be null.public String getMessage()
getMessage
in class Throwable
Copyright © 2010-2018, ForgeRock All Rights Reserved.