Package com.iizix.translate
Class RequestException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.iizix.translate.RequestException
- All Implemented Interfaces:
Serializable
Exception class for HTTP request errors.
- Author:
- Christopher Mindus
- See Also:
Field Summary
Constructor Summary
ConstructorDescriptionRequestException
(String message) Creates a request exception.RequestException
(String message, Throwable cause) Creates a request exception.RequestException
(String message, Throwable cause, int rc, String reply) Creates a request exception.Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Field Details
rc
public final int rcThe HTTP return code, -1 if no code can be discerned from the response (i.e., the response is not valid HTTP).reply
The HTTP reply. Extracts the Strings "OK" and "Not Found" respectively from the HTTP reply (e.g. "HTTP/1.0 404 Not Found"), null if none could be discerned from the responses (the result was not valid HTTP).
Constructor Details
RequestException
Creates a request exception.- Parameters:
message
- The message.
RequestException
Creates a request exception.- Parameters:
message
- The message.cause
- The cause.
RequestException
Creates a request exception.- Parameters:
message
- The message.cause
- The cause.returnCode
- The HTTP return code.reply
- The reply from HTTP.