public static boolean showErrorDialog(@NlsContexts.DialogTitle String title, @NlsContexts.DetailedDescription String text) {
    if (ApplicationManager.getApplication().isUnitTestMode()) {
      throw new RuntimeException(title + ": " + text);
    }
    Ref<Boolean> ok = new Ref<>(false);
    try {
      ApplicationManager.getApplication().invokeAndWait(() -> {
          IOExceptionDialog dialog = new IOExceptionDialog(title, text);
          dialog.show();
          ok.set(dialog.isOK());
        });
    }
    catch (RuntimeException e) {
      LOG.info(e);
    }

    return ok.get();
  }
public static boolean showErrorDialog(@NlsContexts.DialogTitle String title, @NlsContexts.DetailedDescription String text)