private static StringBuilder getExceptionMessage(final String exceptionName, final int retryCount,
      final boolean finalAttempt, final Connection connection) {
    final StringBuilder message = new StringBuilder(200);
    message.append("Pool unexpected ").append(exceptionName);
    if (connection != null) {
      message.append(" connection=").append(connection);
    }
    if (retryCount > 0) {
      message.append(" attempt=").append(retryCount + 1);
    }
    message.append(')');
    if (finalAttempt) {
      message.append(". Server unreachable: could not connect after ").append(retryCount + 1)
          .append(" attempts");
    }
    return message;
  }
This method will throw an exception if we need to stop the connection manager if there are
failures.
geode-core/src/main/java/org/apache/geode/cache/client/internal/OpExecutorImpl.java