com.sun.identity.sm
Class SMSException

com.sun.identity.sm.SMSException
Direct Known Subclasses:
InvalidAttributeNameException, SchemaException, ServiceAlreadyExistsException, ServiceNotFoundException

public class SMSException

The exception class whose instance is thrown if there is any error during the operation of objects of the com.sun.identity.sms package. This class maps the exception that occured 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).


Field Summary
static int STATUS_ABORT
           
static int STATUS_CONFIG_PROBLEM
           
static int STATUS_INVALID_INPUT
           
static int STATUS_LDAP_OP_FAILED
           
static int STATUS_NO_PERMISSION
           
static int STATUS_NONE
           
static int STATUS_QUO_ANTE
           
static int STATUS_REPEATEDLY_FAILED
           
static int STATUS_RETRY
           
static int STATUS_SMS_OP_FAILED
           
static int STATUS_UNKNOWN_EXCEPTION
           
 
Constructor Summary
SMSException()
           
SMSException(int status)
           
SMSException(int status, java.lang.String exMessage)
           
SMSException(java.lang.String msg)
           
SMSException(java.lang.String rbName, java.lang.String errorCode, java.lang.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.
SMSException(java.lang.String message, java.lang.Throwable t)
           
SMSException(java.lang.Throwable t)
           
 
Method Summary
 java.lang.String getErrorCode()
          Returns error code associated with this error message.
 int getExceptionCode()
           
 java.lang.String getL10NMessage(java.util.Locale locale)
           
 java.lang.String getMessage()
           
 java.lang.Object[] getMessageArgs()
          Returns arguments for formatting this error message.
 java.lang.String getResourceBundleName()
          Returns ResourceBundle Name associated with this error message.
 java.lang.String toString()
           
 

Field Detail

STATUS_NONE

public static int STATUS_NONE

STATUS_RETRY

public static int STATUS_RETRY

STATUS_REPEATEDLY_FAILED

public static int STATUS_REPEATEDLY_FAILED

STATUS_ABORT

public static int STATUS_ABORT

STATUS_QUO_ANTE

public static int STATUS_QUO_ANTE

STATUS_LDAP_OP_FAILED

public static int STATUS_LDAP_OP_FAILED

STATUS_CONFIG_PROBLEM

public static int STATUS_CONFIG_PROBLEM

STATUS_UNKNOWN_EXCEPTION

public static int STATUS_UNKNOWN_EXCEPTION

STATUS_SMS_OP_FAILED

public static int STATUS_SMS_OP_FAILED

STATUS_INVALID_INPUT

public static int STATUS_INVALID_INPUT

STATUS_NO_PERMISSION

public static int STATUS_NO_PERMISSION
Constructor Detail

SMSException

public SMSException()

SMSException

public SMSException(int status)
Parameters:
status - The exception status code.

SMSException

public SMSException(int status,
                    java.lang.String exMessage)
Parameters:
status - The Exception status code.
msg - The message provided by the object which is throwing the exception

SMSException

public SMSException(java.lang.String msg)
Parameters:
msg - The message provided by the object which is throwing the exception

SMSException

public SMSException(java.lang.Throwable t)
Parameters:
t - The Throwable object provided by the object which is throwing the exception

SMSException

public SMSException(java.lang.String message,
                    java.lang.Throwable t)
Parameters:
t - The Throwable object provided by the object which is throwing the exception

SMSException

public SMSException(java.lang.String rbName,
                    java.lang.String errorCode,
                    java.lang.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. Instead this constructor provides Resource Bundle name and errorCode for correctly locating the error messsage. The default getMessage() will always return English messages only. This is in consistent with current JRE
Parameters:
rbName - - ResourceBundle 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
Method Detail

getL10NMessage

public java.lang.String getL10NMessage(java.util.Locale locale)
Parameters:
locale -  
Returns:
localized error messge
See Also:
SMSException(String, String, Object[])

getResourceBundleName

public java.lang.String getResourceBundleName()
Returns ResourceBundle Name associated with this error message.
Returns:
ResourceBundle Name associated with this error message.
See Also:
SMSException(String, String, Object[])

getErrorCode

public java.lang.String getErrorCode()
Returns error code associated with this error message.
Returns:
Error code associated with this error message.
See Also:
SMSException(String, String, Object[])

getMessageArgs

public java.lang.Object[] getMessageArgs()
Returns arguments for formatting this error message.
Returns:
arguments for formatting this error message. You need to use MessageFormat class to format the message It can be null.
See Also:
SMSException(String, String, Object[])

getExceptionCode

public int getExceptionCode()

toString

public java.lang.String toString()

getMessage

public java.lang.String getMessage()