private static String getMessage(String callableVitals, int numTries,
    List<Throwable> exceptions) {
    StringBuilder buffer = new StringBuilder("Failed contacting ");
    buffer.append(callableVitals);
    buffer.append(" after ");
    buffer.append(numTries);
    buffer.append(" attempts.\nExceptions:\n");
    for (Throwable t : exceptions) {
      buffer.append(t.toString());
      buffer.append("\n");
    }
    return buffer.toString();
  }
Create a new RetriesExhaustedException from the list of prior failures.
@param numRetries How many times we have retried, one less than total attempts
@param exceptions List of exceptions that failed before giving up
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RetriesExhaustedException.java