@NotNull
  private static @Nls String stringifyErrors(@Nullable Collection<? extends Exception> errors) {
    if (errors == null || errors.isEmpty()) {
      return "";
    }
    @Nls StringBuilder content = new StringBuilder();
    for (Exception e : errors) {
      if (e instanceof VcsException vcsException) {
        for (String message : vcsException.getMessages()) {
          content.append(message.replace(LINE_SEPARATOR, BR)).append(BR);
        }
      }
      else {
        content.append(e.getMessage().replace(LINE_SEPARATOR, BR)).append(BR);
      }
    }
    return content.toString();
  }
@NotNull
  private static @Nls String stringifyErrors(@Nullable Collection<? extends Exception> errors)