Signals that an HTTP or HttpClient exception has occurred.
Constructor and description |
---|
HttpException
() Creates a new HttpException with a null detail message. |
HttpException
(java.lang.String message) Creates a new HttpException with the specified detail message. |
HttpException
(java.lang.String message, java.lang.Throwable cause) Creates a new HttpException with the specified detail message and cause. |
Type Params | Return Type | Name and description |
---|---|---|
|
java.lang.Throwable |
getCause() Return the Throwable that caused this exception, or null if the cause is unavailable, unknown, or not a Throwable. |
|
java.lang.String |
getReason() Get the text description of the reason for an exception. |
|
int |
getReasonCode() Get the status code description of the reason for an exception. |
|
void |
printStackTrace() Print this HttpException and its stack trace to the standard error stream. |
|
void |
printStackTrace(java.io.PrintStream s) Print this HttpException and its stack trace to the specified print stream. |
|
void |
printStackTrace(java.io.PrintWriter s) Print this HttpException and its stack trace to the specified print writer. |
|
void |
setReason(java.lang.String reason) Sets the text description of the reason for an exception. |
|
void |
setReasonCode(int code) Sets the status code description of the reason for an exception. |
Methods inherited from class | Name |
---|---|
class java.io.IOException |
java.io.IOException#printStackTrace(), java.io.IOException#printStackTrace(java.io.PrintStream), java.io.IOException#printStackTrace(java.io.PrintWriter), java.io.IOException#fillInStackTrace(), java.io.IOException#getCause(), java.io.IOException#initCause(java.lang.Throwable), java.io.IOException#toString(), java.io.IOException#getMessage(), java.io.IOException#getSuppressed(), java.io.IOException#getLocalizedMessage(), java.io.IOException#getStackTrace(), java.io.IOException#setStackTrace([Ljava.lang.StackTraceElement;), java.io.IOException#addSuppressed(java.lang.Throwable), java.io.IOException#wait(long), java.io.IOException#wait(long, int), java.io.IOException#wait(), java.io.IOException#equals(java.lang.Object), java.io.IOException#hashCode(), java.io.IOException#getClass(), java.io.IOException#notify(), java.io.IOException#notifyAll() |
Creates a new HttpException with a null detail message.
Creates a new HttpException with the specified detail message.
message
- the exception detail messageCreates a new HttpException with the specified detail message and cause.
message
- the exception detail messagecause
- the Throwable that caused this exception, or null
if the cause is unavailable, unknown, or not a ThrowableReturn the Throwable that caused this exception, or null if the cause is unavailable, unknown, or not a Throwable.
Get the text description of the reason for an exception.
Get the status code description of the reason for an exception.
Print this HttpException and its stack trace to the standard error stream.
Print this HttpException and its stack trace to the specified print stream.
s
- the PrintStream to which the exception and its stack trace
should be writtenPrint this HttpException and its stack trace to the specified print writer.
s
- the PrintWriter to which the exception and its stack trace
should be writtenSets the text description of the reason for an exception.
reason
- The reason for the exception.Sets the status code description of the reason for an exception.
code
- The reason for the exception. This is intended to be an
HTTP status code.