com.yahoo.rest
Class RestException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.yahoo.rest.RestException
All Implemented Interfaces:
Serializable

public class RestException
extends Exception

Class encapsulating a wide range of REST-related errors.

Author:
Ryan Kennedy
See Also:
Serialized Form

Constructor Summary
RestException(String message, byte[] errorMessage)
          Constructs a rest exception with a message and the error content returned by the server.
 
Method Summary
 byte[] getErrorMessage()
          Gets the error content sent back by the server.
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RestException

public RestException(String message,
                     byte[] errorMessage)
Constructs a rest exception with a message and the error content returned by the server.

Parameters:
message - The message to wrap inside the exception.
errorMessage - The error content sent back by the server.
Method Detail

getErrorMessage

public byte[] getErrorMessage()
Gets the error content sent back by the server.

Returns:
The error content sent back by the server.