GitCommandResult (@Nullable Project project, @NotNull Exception e) { // Show notification if it's a project non-modal task and cancel the task ProgressIndicator progressIndicator = ProgressManager.getInstance().getProgressIndicator(); if (project != null && progressIndicator != null && !progressIndicator.getModalityState().dominates(ModalityState.nonModal())) { GitExecutableProblemsNotifier.getInstance(project).notifyExecutionError(e); throw new ProcessCanceledException(e); } else { return GitCommandResult.startError( GitBundle.message("git.executable.validation.error.start.title") + ": \n" + GitExecutableProblemsNotifier.getPrettyErrorMessage(e) ); } }