public static @NotNull Throwable getRootCause(@NotNull Throwable e) {
    while (true) {
      if (e.getCause() == null) return e;
      e = e.getCause();
    }
  }
public static @NotNull Throwable getRootCause(@NotNull Throwable e)