com.netflix.client
Class ClientException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.netflix.client.ClientException
All Implemented Interfaces:
java.io.Serializable

public class ClientException
extends java.lang.Exception

See Also:
Serialized Form

Nested Class Summary
static class ClientException.ErrorType
          define your error codes here
 
Field Summary
protected  int errorCode
           
protected  java.lang.Object errorObject
           
protected  ClientException.ErrorType errorType
           
protected  java.lang.String message
           
 
Constructor Summary
ClientException(ClientException.ErrorType error)
           
ClientException(ClientException.ErrorType error, java.lang.String message)
           
ClientException(ClientException.ErrorType error, java.lang.String message, java.lang.Throwable chainedException)
           
ClientException(int errorCode)
           
ClientException(int errorCode, java.lang.String message)
           
ClientException(int errorCode, java.lang.String message, java.lang.Throwable chainedException)
           
ClientException(java.lang.String message)
           
ClientException(java.lang.String message, java.lang.Throwable chainedException)
           
ClientException(java.lang.Throwable chainedException)
           
 
Method Summary
 int getErrorCode()
           
static java.util.HashMap getErrorCodes(java.lang.Class clazz)
          Return the codes that are defined on a subclass of our class.
 java.lang.String getErrorMessage()
           
 java.lang.Object getErrorObject()
           
 ClientException.ErrorType getErrorType()
           
 java.lang.String getInternalMessage()
          Return the message associated with such an exception.
 void setErrorCode(int errorCode)
           
 void setErrorMessage(java.lang.String msg)
           
 void setErrorObject(java.lang.Object errorObject)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

errorCode

protected int errorCode

message

protected java.lang.String message

errorObject

protected java.lang.Object errorObject

errorType

protected ClientException.ErrorType errorType
Constructor Detail

ClientException

public ClientException(java.lang.String message)

ClientException

public ClientException(int errorCode)

ClientException

public ClientException(int errorCode,
                       java.lang.String message)

ClientException

public ClientException(java.lang.Throwable chainedException)

ClientException

public ClientException(java.lang.String message,
                       java.lang.Throwable chainedException)

ClientException

public ClientException(int errorCode,
                       java.lang.String message,
                       java.lang.Throwable chainedException)

ClientException

public ClientException(ClientException.ErrorType error)

ClientException

public ClientException(ClientException.ErrorType error,
                       java.lang.String message)

ClientException

public ClientException(ClientException.ErrorType error,
                       java.lang.String message,
                       java.lang.Throwable chainedException)
Method Detail

getErrorType

public ClientException.ErrorType getErrorType()

getErrorCode

public int getErrorCode()

setErrorCode

public void setErrorCode(int errorCode)

getErrorMessage

public java.lang.String getErrorMessage()

setErrorMessage

public void setErrorMessage(java.lang.String msg)

getErrorObject

public java.lang.Object getErrorObject()

setErrorObject

public void setErrorObject(java.lang.Object errorObject)

getInternalMessage

public java.lang.String getInternalMessage()
Return the message associated with such an exception.

Returns:
a message asssociated with current exception

getErrorCodes

public static java.util.HashMap getErrorCodes(java.lang.Class clazz)
Return the codes that are defined on a subclass of our class.

Parameters:
clazz - a class that is a subclass of us.
Returns:
a hashmap of int error codes mapped to the string names.