Package org.somda.sdc.dpws.http
Class HttpException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.somda.sdc.dpws.http.HttpException
-
- All Implemented Interfaces:
Serializable
public class HttpException extends Exception
Exception to convey HTTP status codes.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HttpException(int statusCode)Creates an exception with an HTTP status code and empty message.HttpException(int statusCode, String message)Creates an exception with an HTTP status code and a message.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetStatusCode()-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
HttpException
public HttpException(int statusCode)
Creates an exception with an HTTP status code and empty message.Attention: the status code is not verified.
- Parameters:
statusCode- the status code to set.
-
HttpException
public HttpException(int statusCode, String message)Creates an exception with an HTTP status code and a message.The status code is not verified!
- Parameters:
statusCode- the status code to set.message- the message that can be passed to an HTTP content body.
-
-