Package de.uplanet.net.http
Class HttpErrorException
java.lang.Object
java.lang.Throwable
java.lang.Exception
de.uplanet.net.http.HttpErrorException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
HttpClientErrorException
,HttpServerErrorException
- See Also:
-
Constructor Summary
ConstructorDescriptionHttpErrorException
(int p_iStatus) Create a HTTP exception with the given status code.HttpErrorException
(int p_iStatus, String p_strMessage) Create a HTTP exception with the given status code.HttpErrorException
(int p_iStatus, String p_strMessage, Throwable p_cause) Create a HTTP exception with the given status code.HttpErrorException
(int p_iStatus, Throwable p_cause) Create a HTTP exception with the given status code. -
Method Summary
Modifier and TypeMethodDescriptionint
Get the HTTP status associated with this error.Get the HTTP status message associated with this error.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpErrorException
public HttpErrorException(int p_iStatus) Create a HTTP exception with the given status code.- Parameters:
p_iStatus
- The status code.
-
HttpErrorException
Create a HTTP exception with the given status code.- Parameters:
p_iStatus
- The status code.p_strMessage
- An error message that can be later retrieved by theThrowable.getMessage()
method.
-
HttpErrorException
Create a HTTP exception with the given status code.- Parameters:
p_iStatus
- The status code.p_cause
- The cause that can be later retrieved by theThrowable.getCause()
method. Anull
value is permitted, and indicates that the cause is nonexistent or unknown.
-
HttpErrorException
Create a HTTP exception with the given status code.- Parameters:
p_iStatus
- The status code.p_strMessage
- An error message that can be later retrieved by theThrowable.getMessage()
method.p_cause
- The cause that can be later retrieved by theThrowable.getCause()
method. Anull
value is permitted, and indicates that the cause is nonexistent or unknown.
-
-
Method Details
-
getStatus
public int getStatus()Get the HTTP status associated with this error.- Returns:
- The HTTP status.
-
getStatusMessage
Get the HTTP status message associated with this error.If no message was provided with the constructor, the standard status message will be returned.
- Returns:
- The status message.
-