com.sas.hls.client.exception
Class HttpException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.sas.hls.client.exception.HttpException
All Implemented Interfaces:
Serializable

public class HttpException
extends RuntimeException

Exception thrown when there was an HTTP or communications error between the client and server. See the exception message for more specific information (if available).

See Also:
Serialized Form

Constructor Summary
HttpException(int statusCode, String message)
          Constructs an HttpException with the specified HTTP status code and message.
HttpException(String message)
          Constructs an HttpException with the specified message.
HttpException(String message, Throwable cause)
          Constructs an HttpException with the specified message and cause.
 
Method Summary
 int getStatusCode()
          Gets the HTTP status code.
 
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
 

Constructor Detail

HttpException

public HttpException(String message)
Constructs an HttpException with the specified message.

Parameters:
message - the detail message (which is saved for later retrieval by the Throwable.getMessage() method).

HttpException

public HttpException(int statusCode,
                     String message)
Constructs an HttpException with the specified HTTP status code and message.

Parameters:
statusCode - the HTTP status code
message - the detail message (which is saved for later retrieval by the Throwable.getMessage() method).

HttpException

public HttpException(String message,
                     Throwable cause)
Constructs an HttpException with the specified message and cause.

Parameters:
message - the detail message (which is saved for later retrieval by the Throwable.getMessage() method).
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Method Detail

getStatusCode

public int getStatusCode()
Gets the HTTP status code.

Returns:
HTTP status


Copyright (c) 2012, SAS Institute Inc., Cary, NC, USA