code: public static PackageManagerHttpActionException forHttpError(String url, StatusLine statusLine,
        String responseString) {
      String message = "HTTP call to " + url + " failed with status " + statusLine.getStatusCode()
          + " " + statusLine.getReasonPhrase()
          + (responseString != null ? "\n" + responseString : "");
      return new PackageManagerHttpActionException(message);
    }
docs: Create exception instance for I/O exception.
  @param url HTTP url called
  @param statusLine HTTP status line
  @param responseString Response string or null
  @return Exception instance