public static @NlsContexts.DialogMessage String processError(Exception e) {
    String message;

    if (e instanceof VMStartException e1) {
      message = e1.getLocalizedMessage();
    }
    else if (e instanceof IllegalConnectorArgumentsException e1) {
      final List<String> invalidArgumentNames = e1.argumentNames();
      message = formatMessage(
        JavaDebuggerBundle.message("error.invalid.argument", invalidArgumentNames.size()) + ": " + e1.getLocalizedMessage()) + invalidArgumentNames;
      LOG.debug(e1);
    }
    else if (e instanceof CantRunException) {
      message = e.getLocalizedMessage();
    }
    else if (e instanceof VMDisconnectedException) {
      message = JavaDebuggerBundle.message("error.vm.disconnected");
    }
    else if (e instanceof IOException) {
      message = processIOException((IOException)e, null);
    }
    else if (e instanceof ExecutionException) {
      message = e.getLocalizedMessage();
    }
    else {
      message = JavaDebuggerBundle.message("error.exception.while.connecting", e.getClass().getName(), e.getLocalizedMessage());
      LOG.debug(e);
    }
    return message;
  }
public static @NlsContexts.DialogMessage String processError(Exception e)