
nl.tweeenveertig.openstack.exception.CommandException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of joss Show documentation
Show all versions of joss Show documentation
Java Client library for OpenStack Storage (Swift)
package nl.tweeenveertig.openstack.exception;
public class CommandException extends RuntimeException {
private int httpStatusCode;
private CommandExceptionError error;
public CommandException(Integer httpStatusCode, CommandExceptionError error) {
this.httpStatusCode = httpStatusCode;
this.error = error;
}
public CommandException(String message) {
super(message);
}
public CommandException(String message, Throwable rootCause) {
super(message, rootCause);
}
public int getHttpStatusCode() {
return this.httpStatusCode;
}
public CommandExceptionError getError() {
return this.error;
}
public String toString() {
return httpStatusCode != 0 && error != null ?
"Command exception, HTTP Status code: "+httpStatusCode+" => " + error :
super.toString();
}
}