Package com.sun.identity.entity
Class EntityException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.sun.identity.entity.EntityException
-
- All Implemented Interfaces:
Serializable
public class EntityException extends Exception
TheEntityExceptionis thrown whenever an error is is encountered while performing an operation on the data store.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EntityException(String msg, String errorCode)Constructs a newEntityExceptionwith detailed message.EntityException(String msg, String errorCode, Object[] args)Constructs a newEntityExceptionwith detailed message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetErrorCode()Method to obtain the error code.StringgetLDAPErrorCode()Method to obtain the LDAP error code.StringgetMessage()Overriding the defaultgetMessage()method of super class Exception.Object[]getMessageArgs()Method to obtain the arguments corresponding to the error code.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
EntityException
public EntityException(String msg, String errorCode)
Constructs a newEntityExceptionwith detailed message.- Parameters:
msg- The detailed messageerrorCode- Matches the appropriate entry inamProfile.properties.
-
EntityException
public EntityException(String msg, String errorCode, Object[] args)
Constructs a newEntityExceptionwith detailed message.- Parameters:
msg- The detailed messageerrorCode- Matches the appropriate entry inamProfile.propertiesargs- if the error message needs specific values to be set
-
-
Method Detail
-
getErrorCode
public String getErrorCode()
Method to obtain the error code. This error code can be used with the arguments to construct a localized message.- Returns:
- the error code which can be used to map the message to a user specific locale.
-
getMessageArgs
public Object[] getMessageArgs()
Method to obtain the arguments corresponding to the error code.- Returns:
- the arguments corresponding to the error code or null if no arguments are need to construct the message
-
getMessage
public String getMessage()
Overriding the defaultgetMessage()method of super class Exception.- Overrides:
getMessagein classThrowable- Returns:
- The error message string
-
getLDAPErrorCode
public String getLDAPErrorCode()
Method to obtain the LDAP error code.- Returns:
- The error code, which can be used to map the message to a specific locale. returns a null, if not an LDAP error
-
-