private static RuntimeException getCause(QueryError queryError) { if (queryError.getFailureInfo() != null) { return queryError.getFailureInfo().toException(); } return null; }
public void renderFailure(PrintStream out) { QueryStatusInfo results = client.finalStatusInfo(); QueryError error = results.getError(); checkState(error != null); out.printf("Query %s failed: %s%n", results.getId(), error.getMessage()); if (debug && (error.getFailureInfo() != null)) { error.getFailureInfo().toException().printStackTrace(out); } if (error.getErrorLocation() != null) { renderErrorLocation(client.getQuery(), error.getErrorLocation(), out); } out.println(); }
if (error.getFailureInfo() != null) { RuntimeException remoteException = error.getFailureInfo().toException(); throw new RuntimeException(Optional.ofNullable(remoteException.getMessage()).orElseGet(remoteException::toString), remoteException);
com.facebook.presto.client.ErrorLocation errorLocation = error.getErrorLocation(); QueryError queryError = new QueryError( Optional.ofNullable(error.getFailureInfo().getMessage()) .orElse(error.getFailureInfo().toException().toString()), error.getSqlState(), error.getErrorCode(),
public void renderFailure(PrintStream out) { QueryStatusInfo results = client.finalStatusInfo(); QueryError error = results.getError(); checkState(error != null); out.printf("Query %s failed: %s%n", results.getId(), error.getMessage()); if (debug && (error.getFailureInfo() != null)) { error.getFailureInfo().toException().printStackTrace(out); } if (error.getErrorLocation() != null) { renderErrorLocation(client.getQuery(), error.getErrorLocation(), out); } out.println(); }
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(); }
if (error.getFailureInfo() != null) { RuntimeException remoteException = error.getFailureInfo().toException(); throw new RuntimeException(Optional.ofNullable(remoteException.getMessage()).orElseGet(remoteException::toString), remoteException);