docs: public static Throwable getRootCause(final Throwable e) {
          Throwable rootCause = e;
          while (rootCause.getCause() != null && rootCause.getCause() != rootCause) {
              rootCause = rootCause.getCause();
          }
          return rootCause;
      }