com.echonest.api.v4
Class EchoNestException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.echonest.api.v4.EchoNestException
All Implemented Interfaces:
java.io.Serializable

public class EchoNestException
extends java.lang.Exception

Represents echo nest oriented exceptions

See Also:
Serialized Form

Field Summary
static int CLIENT_SERVER_INCONSISTENCY
          the client API expected something different from the server
static int ERR_ACCESS_DENIED
          API Key is not allowed to call this method
static int ERR_INVALID_PARAMETER
          access to an invalid field
static int ERR_MISSING_OR_INVALID_API_KEY
          Missing/Invalid API Key
static int ERR_MISSING_PARAMETER
          missing parameter
static int ERR_NO_KEY
          no api key was given
static int ERR_RATE_LIMIT_EXCEEDED
          Rate limit exceeded
static int SUCCESS
          success
 
Constructor Summary
EchoNestException(int code, java.lang.String message)
          Creates an exception
EchoNestException(java.lang.Throwable arg0)
          Creates an exception
 
Method Summary
 int getCode()
          Gets the error code
 java.lang.String getMessage()
          Gets the exception message
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SUCCESS

public static final int SUCCESS
success

See Also:
Constant Field Values

ERR_MISSING_OR_INVALID_API_KEY

public static final int ERR_MISSING_OR_INVALID_API_KEY
Missing/Invalid API Key

See Also:
Constant Field Values

ERR_ACCESS_DENIED

public static final int ERR_ACCESS_DENIED
API Key is not allowed to call this method

See Also:
Constant Field Values

ERR_RATE_LIMIT_EXCEEDED

public static final int ERR_RATE_LIMIT_EXCEEDED
Rate limit exceeded

See Also:
Constant Field Values

ERR_MISSING_PARAMETER

public static final int ERR_MISSING_PARAMETER
missing parameter

See Also:
Constant Field Values

ERR_INVALID_PARAMETER

public static final int ERR_INVALID_PARAMETER
access to an invalid field

See Also:
Constant Field Values

CLIENT_SERVER_INCONSISTENCY

public static final int CLIENT_SERVER_INCONSISTENCY
the client API expected something different from the server

See Also:
Constant Field Values

ERR_NO_KEY

public static final int ERR_NO_KEY
no api key was given

See Also:
Constant Field Values
Constructor Detail

EchoNestException

public EchoNestException(int code,
                         java.lang.String message)
Creates an exception

Parameters:
code - the error code
message - a description of the exception

EchoNestException

public EchoNestException(java.lang.Throwable arg0)
Creates an exception

Parameters:
arg0 - the wrapped throwable
Method Detail

getCode

public int getCode()
Gets the error code

Returns:
the error code

getMessage

public java.lang.String getMessage()
Gets the exception message

Overrides:
getMessage in class java.lang.Throwable
Returns:
the message


Use of the Echo Nest API is subject to the Echo Nest Developer Network's terms of service