We are aborting this request.  If this is a launch, redirect back
17560
private static function abort_with_error_log($msg, $extra=false, $prefix="DIE:") {
        $return_url = isset($_POST['launch_presentation_return_url']) ? $_POST['launch_presentation_return_url'] : null;
        if ( is_array($extra) ) $extra = Output::safe_var_dump($extra);
        if ($return_url === null) {
            // make the msg a bit friendlier
            header('X-Tsugi-Test-Harness: https://www.tsugi.org/lti-test/');
            header('X-Tsugi-Base-String-Checker: https://www.tsugi.org/lti-test/basecheck.php');
            if ( $extra && ! headers_sent() ) {
                header('X-Tsugi-Error-Detail: '.str_replace("\n"," -- ",$extra));
            }
            error_log($prefix.' '.$msg.' '.$extra);
            print_stack_trace();
            $url = "https://www.tsugi.org/launcherror";
            $url = U::add_url_parm($url, "detail", $msg);
            Output::htmlError("The LTI Lauch Failed", "Detail: $msg", $url);
            exit();
        }
        $return_url .= ( strpos($return_url,'?') > 0 ) ? '&' : '?';
        $return_url .= 'lti_errormsg=' . urlencode($msg);
        if ( $extra !== false ) {
            if ( strlen($extra) < 200 ) $return_url .= '&detail=' . urlencode($extra);
            header('X-Tsugi-Error-Detail: '.str_replace("\n"," -- ",$extra));
        }
        header("Location: ".$return_url);
        error_log($prefix.' '.$msg.' '.$extra);
        exit();
    }
100689
private void abort(Error error) {
    try {
      if (mContext == null || mContext.getError() != null || mContext.isDoneUnsafe()) {
        // Note, we may reach here via events due to network errors bubbling up before
        // mContext is initialized, or stream error after the request is finished.
        return;
      }
      mContext.setError(error);
      cleanupRequest(mContext);
      replyError();
    } catch (Exception e) {
      LOG.warn("Failed to cleanup states with error {}.", e.getMessage());
    }
  }
259599
def stop(self):
        '''  '''
        Global.LOGGER.debug(f"action {self.name} stopped")
        self.is_running = False
        self.on_stop()
654357
function(err) {
                // If we aborted, ignore it
                if (req.wasAborted) {
                    return;
                }

                if (err && err.status === 401 && that._shouldAutoLogin()) {
                    // If we had an authorization error, we'll try and login
                    // again, but only once
                    that.sessionKey = null;
                    that.login(function(err, success) {
                        // If we've already aborted the request,
                        // just do nothing
                        if (req.wasAborted) {
                            return;
                        }

                        if (err) {
                            // If there was an error logging in, send it through
                            callback(err);
                        }
                        else {
                            // Relogging in was successful, so we execute
                            // our task again.
                            task(callback);
                        }
                    });
                }
                else {
                    callback.apply(null, arguments);
                }
            }
94196
function (done) {
      if (called) return;

      called = true;

      // wait for req events to fire
      process.nextTick(function() {
        if (waitend && req.readable) {
          // dump rest of request
          req.resume();
          req.once('end', done);
          return;
        }

        done();
      });
    }
921883
def abort(self, err):
        """"""
        if _debug: IOCB._debug("abort(%d) %r", self.ioID, err)

        if self.ioController:
            # pass to controller
            self.ioController.abort_io(self, err)
        elif self.ioState < COMPLETED:
            # just fill in the data
            self.ioState = ABORTED
            self.ioError = err
            self.trigger()
1150681
def abort (self):
        """"""
        self.print_active_threads()
        self.cancel()
        timeout = self.config["aborttimeout"]
        try:
            self.urlqueue.join(timeout=timeout)
        except urlqueue.Timeout:
            log.warn(LOG_CHECK, "Abort timed out after %d seconds, stopping application." % timeout)
            raise KeyboardInterrupt()
1354118
def abort(self):
        
        self._coll.chunks.delete_many(
            {"files_id": self._file['_id']}, session=self._session)
        self._coll.files.delete_one(
            {"_id": self._file['_id']}, session=self._session)
        object.__setattr__(self, "_closed", True)
1165508
function abort() {
    this.aborted = true;
    this.responseText = null;
    this.errorFlag = true;
    this.requestHeaders = {};

    this.dispatchEvent(new _Event("abort", false, false, this));

    if (this.readyState > FakeXMLHttpRequest.UNSENT && this.sendFlag) {
      this._readyStateChange(FakeXMLHttpRequest.UNSENT);
      this.sendFlag = false;
    }

    if (typeof this.onerror === "function") {
      this.onerror();
    }
  }
1176262
final boolean abort() {
        if (!taken.get()) {
            // aborting always runs before connection
            // happens. If we reach this point the request
            // can be active or suspended
            // but nor delivered or committed
            result = BaasResult.cancel();
            // we can simply forcefully set the value
            // to ABORTED to let the resource been cleaned up
            suspendableHandler.set(Signal.ABORTED);
            finish();
            return true;
        }
        return false;
    }
933355
def cancel_requests(self):
        """"""
        self._timer.stop()
        self._job = None
        self._args = None
        self._kwargs = None
1241998
def AbortProcessing(obj, eng, callbacks, exc_info):
        """"""
        msg = "Processing was aborted for object: {0}".format(obj.id)
        eng.log.debug(msg)
        raise Break
998618
protected void abort() throws CmsPublishException {

        if (m_started) {
            throw new CmsPublishException(Messages.get().container(Messages.ERR_PUBLISH_ENGINE_MISSING_PUBLISH_JOB_0));
        }
        m_abort = true;
    }
471898
public function abort()
    {
        if ($this->aborted) {
            return;
        }

        $this->aborted = true;
        $this->onWakeup();
        $this->onAbort();

        if ((ignore_user_abort() === 1)
            && (($this->state === Generic::STATE_RUNNING) || ($this->state === Generic::STATE_WAITING))
            && !Daemon::$compatMode
        ) {
            $this->upstream->endRequest($this);
        } else {
            $this->finish(-1);
        }

        $this->onSleep();
    }
1250700
protected function abortCommandExecution()
    {
        $this->server = $this->checkEnv('server', 'ACACHA_FORGE_SERVER');
        $this->domain = $this->checkEnv('domain', 'ACACHA_FORGE_DOMAIN');

        if (! File::exists($this->localPath = base_path('.env.production'))) {
            $this->error('File ' . $this->localPath . ' not found!');
            die();
        }

        $this->abortIfNoSSHConnection();
    }
1188196
function abortSuite() {
    var event,
        me = this,
        resetting = calledBy.resetSuite;

    if (me.running) {
      event = Event('abort');
      me.emit(event);
      if (!event.cancelled || resetting) {
        // avoid infinite recursion
        calledBy.abortSuite = true;
        me.reset();
        delete calledBy.abortSuite;

        if (!resetting) {
          me.aborted = true;
          invoke(me, 'abort');
        }
      }
    }
    return me;
  }
1289952
def abort(self, inplace=True):
        
        extra = {
            'resource': self.__class__.__name__,
            'query': {'id': self.id}
        }
        logger.info('Aborting task', extra=extra)
        task_data = self._api.post(
            url=self._URL['abort'].format(id=self.id)).json()
        return Task(api=self._api, **task_data)