> +import static com.google.common.base.Preconditions.checkNotNull;
> +
> +import org.jclouds.labs.b2.domain.B2Error;
> +import org.jclouds.http.HttpCommand;
> +import org.jclouds.http.HttpResponse;
> +import org.jclouds.http.HttpResponseException;
> +
> +public class B2ResponseException extends HttpResponseException {
> +
> +   private static final long serialVersionUID = 1L;
> +   private final B2Error error;
> +
> +   public B2ResponseException(HttpCommand command, HttpResponse response, 
> B2Error error) {
> +      super("request " + command.getCurrentRequest().getRequestLine() + " 
> failed with code " + response.getStatusCode()
> +            + ", error: " + error.toString(), command, response);
> +      this.error = checkNotNull(error, "error");

This check should be performed *before* calling its toString() method.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/270/files/8bb355e1b286b2bbf77fd8d3cb75cd2d1aa6bc69#r64484949

Reply via email to