public static void processIncorrectOperation(Project project, IncorrectOperationException e) {
    String message = e.getMessage();
    int index = message != null ? message.indexOf("java.io.IOException") : -1;
    if (index > 0) {
      message = message.substring(index + "java.io.IOException".length());
    }

    String s = message;
    ApplicationManager.getApplication().invokeLater(
      () -> Messages.showMessageDialog(project, s, RefactoringBundle.message("error.title"), Messages.getErrorIcon()));
  }
public static void processIncorrectOperation(Project project, IncorrectOperationException e)