public static @Nls @NotNull String getPrettyErrorMessage(@NotNull Throwable exception) {
    String errorMessage = null;
    if (exception instanceof GitVersionIdentificationException) {
      if (exception.getCause() != null) {
        Throwable cause = exception.getCause();
        if (cause instanceof NoSuchFileException) {
          errorMessage = GitBundle.message("git.executable.error.file.not.found", cause.getMessage());
        }
        else {
          errorMessage = cause.getMessage();
        }
      }
    }
    if (errorMessage == null) {
      if (exception.getMessage() != null) {
        return exception.getMessage();
      }
      else {
        return VcsBundle.message("exception.text.unknown.error");
      }
    }
    return errorMessage;
  }
public static @Nls @NotNull String getPrettyErrorMessage(@NotNull Throwable exception)