public static void showErrorMessage(@DialogTitle String title,
                                      @DialogMessage String message,
                                      @NonNls @Nullable String helpId,
                                      @NotNull Project project) {
    if (ApplicationManager.getApplication().isUnitTestMode()) throw new RuntimeException(message);
    IdeUiService.getInstance().showRefactoringMessageDialog(title, message, helpId, "OptionPane.errorIcon", false, project);
  }
public static void showErrorMessage(@DialogTitle String title,
                                      @DialogMessage String message,
                                      @NonNls @Nullable String helpId,
                                      @NotNull Project project)