Package com.sun.identity.rest
Class RestException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.sun.identity.rest.RestException
-
- All Implemented Interfaces:
Serializable
public class RestException extends Exception
Entitlement related exception.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RestException(int errorCode)Creates an entitlement exception.RestException(int errorCode, Object[] params)Creates an entitlement exception.RestException(int errorCode, Object[] params, Throwable cause)Creates an entitlement exception.RestException(int errorCode, Throwable cause)Creates an entitlement exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetErrorCode()Returns error code.StringgetLocalizedMessage()Returns localized exception message.StringgetLocalizedMessage(Locale locale)Returns localized exception message.StringgetMessage()Returns exception message.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
RestException
public RestException(int errorCode)
Creates an entitlement exception.- Parameters:
errorCode- Error code.
-
RestException
public RestException(int errorCode, Object[] params)Creates an entitlement exception.- Parameters:
errorCode- Error code.params- Parameters for formatting the message string.
-
RestException
public RestException(int errorCode, Throwable cause)Creates an entitlement exception.- Parameters:
errorCode- Error code.cause- Root cause.
-
-
Method Detail
-
getErrorCode
public int getErrorCode()
Returns error code.- Returns:
- error code.
-
getMessage
public String getMessage()
Returns exception message.- Overrides:
getMessagein classThrowable- Returns:
- exception message.
-
getLocalizedMessage
public String getLocalizedMessage()
Returns localized exception message.- Overrides:
getLocalizedMessagein classThrowable- Returns:
- localized exception message.
-
-