pl.touk.sputnik.connector.http.HttpException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sputnik Show documentation
Show all versions of sputnik Show documentation
Static code review for your Gerrit and Stash patchsets. Runs Checkstyle, PMD and SpotBugs for you!
package pl.touk.sputnik.connector.http;
import org.apache.http.HttpResponse;
public class HttpException extends RuntimeException {
private final HttpResponse response;
public HttpException(HttpResponse response) {
this.response = response;
}
public int getStatusCode() {
return response.getStatusLine().getStatusCode();
}
public String getMessage() {
return "Response status [" + getStatusCode() + "]";
}
}