public class IdRepoException extends Exception implements L10NMessage
com.sun.identity.sms
package. This
class maps the exception that occurred at a lower level to a high level
error. Using the exception status code getExceptionCode()
the
errors are categorized as a ABORT
, RETRY
,
CONFIG_PROBLEM
or LDAP_OP_FAILED
(typically a
bug).Constructor and Description |
---|
IdRepoException() |
IdRepoException(String msg) |
IdRepoException(String msg,
String errorCode) |
IdRepoException(String rbName,
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.
|
IdRepoException(String rbName,
String errorCode,
org.forgerock.opendj.ldap.ResultCode ldapResultCode,
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.
|
IdRepoException(String rbName,
String errorCode,
String ldapErrCode,
Object[] args)
Deprecated.
Passing in an ldapErrorCode as a String is not recommended, use the
OO ctor instead.
|
Modifier and Type | Method and Description |
---|---|
String |
getConstraintViolationDetails()
If this error is an instance of a LDAP Constraint Violated Error (LDAP code 313)
attempts to return useful information about the error that occured without
leaking additional information about the system to the calling user.
|
String |
getErrorCode()
Returns error code associated with this error message.
|
String |
getL10NMessage(Locale locale)
Returns a localized error message
|
String |
getLDAPErrorCode()
Deprecated.
Use #getLdapErrorIntCode() instead. The ldap error code is always an int
|
int |
getLdapErrorIntCode()
Returns an int representation of
ldapErrCode . |
String |
getMessage()
Returns the error message of this exception.
|
Object[] |
getMessageArgs()
Returns arguments for formatting this error message.
|
String |
getResourceBundleName()
Returns
ResourceBundle Name associated with this error
message. |
void |
setLDAPErrorCode(String errorCode)
Replace the LDAP error code associated with this error message.
|
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public IdRepoException()
public IdRepoException(String msg)
msg
- The message provided by the object which is throwing the
exception@Deprecated public IdRepoException(String rbName, String errorCode, String ldapErrCode, Object[] args)
getMessage()
will always return
English messages only. This is in 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)
.ldapErrCode
- ldap error codeargs
- arguments to message. If it is not present pass the as null.public IdRepoException(String rbName, String errorCode, org.forgerock.opendj.ldap.ResultCode ldapResultCode, Object[] args)
getMessage()
will always return
English messages only. This is in 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)
.ldapResultCode
- ldap result codeargs
- arguments to message. If it is not present pass the as null.public IdRepoException(String rbName, String errorCode, Object[] args)
getMessage()
will always return
English messages only. This is in 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 the as null.public String getL10NMessage(Locale locale)
getL10NMessage
in interface L10NMessage
locale
- Uses the locale object to create the appropriate localized
error messageIdRepoException(String, String, Object[])
public String getResourceBundleName()
ResourceBundle
Name associated with this error
message.getResourceBundleName
in interface L10NMessage
ResourceBundle
name associated with this error
message.IdRepoException(String, String, Object[])
public int getLdapErrorIntCode()
ldapErrCode
.
This is to be used with ResultCode.valueOf() which will return a valid
ResultCode object regardless of the return of this method.
A null or invalid ldapErrorCode
will return -1
.public String getErrorCode()
getErrorCode
in interface L10NMessage
IdRepoException(String, String, Object[])
@Deprecated public String getLDAPErrorCode()
LDAPException
.IdRepoException(String, String, Object[])
public void setLDAPErrorCode(String errorCode)
public Object[] getMessageArgs()
getMessageArgs
in interface L10NMessage
MessageFormat
class to format the message It can
be null.IdRepoException(String, String, Object[])
public String getMessage()
getMessage
in interface L10NMessage
getMessage
in class Throwable
public String getConstraintViolationDetails()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.