boolean (@Nullable Project project, @NotNull UnexpectedUndoException exception, boolean isUndo) { String title; String message; if (isUndo) { title = IdeBundle.message("cannot.undo.title"); message = IdeBundle.message("cannot.undo.message"); } else { title = IdeBundle.message("cannot.redo.title"); message = IdeBundle.message("cannot.redo.message"); } if (!ApplicationManager.getApplication().isUnitTestMode()) { if (exception.getMessage() != null) { message += ".\n" + exception.getMessage(); } Messages.showMessageDialog(project, message, title, Messages.getErrorIcon()); } else { LOG.error(exception); } return true; }