Exemplo n.º 1
0
  public void renderFailure(PrintStream out) {
    QueryResults results = client.finalResults();
    QueryError error = results.getError();
    checkState(error != null);

    out.printf("Query %s failed: %s%n", results.getId(), error.getMessage());
    if (client.isDebug() && (error.getFailureInfo() != null)) {
      error.getFailureInfo().toException().printStackTrace(out);
    }
    if (error.getErrorLocation() != null) {
      renderErrorLocation(client.getQuery(), error.getErrorLocation(), out);
    }
    out.println();
  }
Exemplo n.º 2
0
 private static String failureMessage(QueryResults results) {
   return format("Query failed (#%s): %s", results.getId(), results.getError().getMessage());
 }