private void doCancel(@Nullable Throwable cause, @NotNull String reason) {
    if (tryCancel()) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("doCancel(" + this +
                  (reason.isEmpty() ? "" : ", reason: '" + reason + "'") +
                  (cause == null ? "" : ", cause: " + ExceptionUtil.getThrowableText(cause)) +
                  ")"
        );
      }
      myCancellationCause = cause;
      if (cause != null) {
        myTraceableDisposable.killExceptionally(cause);
      }
      ProgressManager.getInstance().executeNonCancelableSection(() -> onCancelled(reason));
    }
  }
private void doCancel(@Nullable Throwable cause, @NotNull String reason)