Package com.sas.lsaf.client
Class HttpException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.sas.lsaf.core.AbstractRuntimeException
com.sas.lsaf.client.HttpException
- All Implemented Interfaces:
Serializable
Thrown when there was an HTTP or communications error between the client and server. See the exception message for
more specific information (if available).
- Since:
- 1.1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHttpException(int statusCode, String message) Constructs anHttpExceptionwith the specified HTTP status code and message.HttpException(int statusCode, String message, Throwable cause) Constructs anHttpExceptionwith the specified HTTP status code, message and cause.HttpException(String message) Constructs anHttpExceptionwith the specified message.HttpException(String message, Throwable cause) Constructs anHttpExceptionwith the specified message and cause. -
Method Summary
Modifier and TypeMethodDescriptionintReturn the HTTP status code associated with this exception, if one exists.Methods inherited from class com.sas.lsaf.core.AbstractRuntimeException
getMessage, getRootCauseMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpException
Constructs anHttpExceptionwith the specified message.- Parameters:
message- the detail message (which is saved for later retrieval by theAbstractRuntimeException.getMessage()method).
-
HttpException
Constructs anHttpExceptionwith the specified HTTP status code and message.- Parameters:
statusCode- the HTTP status codemessage- the detail message (which is saved for later retrieval by theAbstractRuntimeException.getMessage()method).
-
HttpException
Constructs anHttpExceptionwith the specified HTTP status code, message and cause.- Parameters:
statusCode- the HTTP status codemessage- the detail message (which is saved for later retrieval by theAbstractRuntimeException.getMessage()method).cause- the cause (which is saved for later retrieval by theThrowable.getCause()method). (Anullvalue is permitted, and indicates that the cause is nonexistent or unknown.)
-
HttpException
Constructs anHttpExceptionwith the specified message and cause.- Parameters:
message- the detail message (which is saved for later retrieval by theAbstractRuntimeException.getMessage()method).cause- the cause (which is saved for later retrieval by theThrowable.getCause()method). (Anullvalue is permitted, and indicates that the cause is nonexistent or unknown.)
-
-
Method Details
-
getStatusCode
public int getStatusCode()Return the HTTP status code associated with this exception, if one exists.- Returns:
- the HTTP status code associated with this exception, if one exists.
-