private static @NotNull Throwable getCause(@NotNull Throwable throwable) {
    final boolean isPluginException = throwable instanceof PluginException && throwable.getCause() != null;
    return isPluginException ? throwable.getCause() : throwable;
  }
private static @NotNull Throwable getCause(@NotNull Throwable throwable)