Package org.apache.commons.httpclient
Class HttpException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.commons.httpclient.HttpException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
HttpContentTooLargeException
,HttpRecoverableException
,ProtocolException
,URIException
Deprecated.
Jakarta Commons HttpClient 3.x is deprecated in the Jenkins project.
It is not recommended to use it in any new code.
Instead, use HTTP client API plugins as a dependency in your code.
E.g.
Apache HttpComponents Client API 4.x Plugin or
Async HTTP Client Plugin.
Signals that an HTTP or HttpClient exception has occurred.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Creates a new HttpException with a null detail message.HttpException
(String message) Deprecated.Creates a new HttpException with the specified detail message.HttpException
(String message, Throwable cause) Deprecated.Creates a new HttpException with the specified detail message and cause. -
Method Summary
Modifier and TypeMethodDescriptiongetCause()
Deprecated.Return the Throwable that caused this exception, or null if the cause is unavailable, unknown, or not a Throwable.Deprecated.HttpClient no longer uses this for itself.int
Deprecated.HttpClient no longer uses this for itself.void
Deprecated.Print this HttpException and its stack trace to the standard error stream.void
Deprecated.Print this HttpException and its stack trace to the specified print stream.void
Deprecated.Print this HttpException and its stack trace to the specified print writer.void
Deprecated.HttpClient no longer uses this for itself.void
setReasonCode
(int code) Deprecated.HttpClient no longer uses this for itself.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
Constructor Details
-
HttpException
public HttpException()Deprecated.Creates a new HttpException with a null detail message. -
HttpException
Deprecated.Creates a new HttpException with the specified detail message.- Parameters:
message
- the exception detail message
-
HttpException
Deprecated.Creates a new HttpException with the specified detail message and cause.- Parameters:
message
- the exception detail messagecause
- the Throwable that caused this exception, or null if the cause is unavailable, unknown, or not a Throwable- Since:
- 3.0
-
-
Method Details
-
getCause
Deprecated.Return the Throwable that caused this exception, or null if the cause is unavailable, unknown, or not a Throwable. -
printStackTrace
public void printStackTrace()Deprecated.Print this HttpException and its stack trace to the standard error stream.- Overrides:
printStackTrace
in classThrowable
- Since:
- 3.0
-
printStackTrace
Deprecated.Print this HttpException and its stack trace to the specified print stream.- Overrides:
printStackTrace
in classThrowable
- Parameters:
s
- the PrintStream to which the exception and its stack trace should be written- Since:
- 3.0
-
printStackTrace
Deprecated.Print this HttpException and its stack trace to the specified print writer.- Overrides:
printStackTrace
in classThrowable
- Parameters:
s
- the PrintWriter to which the exception and its stack trace should be written- Since:
- 3.0
-
setReason
Deprecated.HttpClient no longer uses this for itself. It is only provided for compatibility with existing clients, and will be removed in a future release.Sets the text description of the reason for an exception.- Parameters:
reason
- The reason for the exception.
-
getReason
Deprecated.HttpClient no longer uses this for itself. It is only provided for compatibility with existing clients, and will be removed in a future release.Get the text description of the reason for an exception. -
setReasonCode
public void setReasonCode(int code) Deprecated.HttpClient no longer uses this for itself. It is only provided for compatibility with existing clients, and will be removed in a future release.Sets the status code description of the reason for an exception.- Parameters:
code
- The reason for the exception. This is intended to be an HTTP status code.
-
getReasonCode
public int getReasonCode()Deprecated.HttpClient no longer uses this for itself. It is only provided for compatibility with existing clients, and will be removed in a future release.Get the status code description of the reason for an exception.
-