io.femo.http.HttpHandleException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http-jdk7 Show documentation
Show all versions of http-jdk7 Show documentation
An easy to use HTTP API, that supports synchronous and asynchronous execution of HTTP request.
On android only asynchronous driver is supported.
This library has been backported to jdk 7 to retain compatibility with android!
The newest version!
package io.femo.http;
/**
* Created by felix on 4/25/16.
*/
public class HttpHandleException extends Exception {
private StatusCode statusCode;
public HttpHandleException(StatusCode statusCode) {
super();
this.statusCode = statusCode;
}
public HttpHandleException(StatusCode statusCode, String message) {
super(message);
this.statusCode = statusCode;
}
public HttpHandleException(StatusCode statusCode, String s, Throwable throwable) {
super(s, throwable);
this.statusCode = statusCode;
}
public HttpHandleException() {
this.statusCode = StatusCode.INTERNAL_SERVER_ERROR;
}
public HttpHandleException(String s) {
super(s);
this.statusCode = StatusCode.INTERNAL_SERVER_ERROR;
}
public HttpHandleException(String s, Throwable throwable) {
super(s, throwable);
this.statusCode = StatusCode.INTERNAL_SERVER_ERROR;
}
public StatusCode getStatusCode() {
return statusCode;
}
}