Cancel the task.

@param string|null $errors Potential errors to display

@return bool
540239
public function halt($errors = null)
    {
        // Display errors
        if ($errors) {
            $this->explainer->error($errors);
        }

        $this->fireEvent('halt');
        $this->halted = true;

        if ($this->event) {
            $this->getEvent()->stopPropagation();
        }

        return false;
    }
512790
public function setErrors($errors)
    {
        $this->errors = strtolower((string) $errors);

        $message = sprintf("Set errors flag to [%s].", $this->errors);
        $this->log($message, Project::MSG_DEBUG);
    }
1245451
public function cancel()
    {
        $this->client->performHttpCallToFullUrl(
            MollieApiClient::HTTP_DELETE,
            $this->_links->self->href
        );

        return null;
    }
681501
public function check(array &$errors = null):int {
		$count = 0;

		foreach($this->taskList as $pathMatch => $task) {
			$absolutePathMatch = implode(DIRECTORY_SEPARATOR, [
				getcwd(),
				$pathMatch,
			]);
			$fileList = Glob::glob($absolutePathMatch);
			if(!empty($fileList)) {
				$task->check($errors);
			}

			$count ++;
		}

		return $count;
	}
484197
protected function setError($error) {
		
		$this->error = array();
		
		foreach (func_get_args() as $err) {
			if (is_array($err)) {
				$this->error = array_merge($this->error, $err);
			} else {
				$this->error[] = $err;
			}
		}
		
		// $this->error = is_array($error) ? $error : func_get_args();
		return false;
	}
1280287
private function invalidCodeReturnData($errors = null)
    {
        $this->_authCount = $this->_twoStepAuth->authCount += 1;
        $this->_twoStepAuth->save();

        $returnData = [
            'message'           => trans('laravel2step::laravel-verification.titleFailed'),
            'authCount'         => $this->_authCount,
            'remainingAttempts' => $this->_remainingAttempts,
        ];

        if ($errors) {
            $returnData['errors'] = $errors;
        }

        return $returnData;
    }
997705
protected function writeErrorAndDie(array $errors)
    {
        $output = (new ConsoleOutput)->getErrorOutput();

        foreach ($errors as $error) {
            $output->writeln($error);
        }

        die(1);
    }
34270
public function cancel()
    {
        if (!empty($this->stack)) {
            array_pop($this->stack);
            if ($this->capturing > 0) {
                $this->capturing--;
                ob_end_flush();
            }
        }
    }
1293229
private function formatErrors($errors)
    {
        if ($errors) {
            $errors = trim($errors);

            if (in_array(substr($errors, -1), ['.', '!', '?'], true)) {
                return $errors;
            }

            return $errors.'.';
        }
    }
455114
public function cancel()
    {
        if ($this->id === null) {
            return false;
        }

        $key = $this->queue->generateListKey();
        $id = "$key:" . $this->id;

        // Delete the job from the current and scheduled queue, then remove the job details from Redis
        $result = $this->queue->getClient()->getRedis()->multi()
            ->zrem($key)
            ->zrem($key . '-scheduled')
            ->del($id)
            ->hset(\date('Y-m-d') . '_cancel', (string)\time(), \json_encode([
                'class' => $this->getWorkerClass(),
                'args' => $this->getArgs(),
                'priority' => (float)$this->getPriority(),
                'id' => $this->getId()
            ]))
            ->exec();

        $this->workerClass = null;
        $this->args = [];
        $this->retry = null;
        $this->priority = null;

        return $result[0] === true || $result[1] === true;
    }
1237500
public static function shutdown_handler($errors = false, $handled = false)
    {
        if ($handled) {
            self::flush();
        }

        if ($errors === true && ($error = error_get_last()) && !$handled) {
            self::error_handler($error["type"], $error["message"], $error["file"], $error["line"]);
        }

        if (!$handled) {
            self::flush();
        }

        if (session_id() != '') {
            session_write_close();
        }

        exit;
    }
696644
def stop(self):
        """"""
        #self.ev_intr.set()

        try:
            self.task.stop()

        except TaskError as e:
            self.logger.error("Error cancelling child task: %s" % (str(e)))
57002
public function setErrors($errors) 
	{
		if(is_array($errors)) {
			$this->errors = $errors;
			return $this;
		}
		
		$args = func_get_args();
		$this->errors[$args[0]] = $args[1];
		
		return $this;
	}
360311
public function cancelTransaction($params)
    {
        $this->sdk->ServiceURL = $this->getApiEndpoint('DoAction');
        $this->sdk->Action = array_replace(
            $this->sdk->Action,
            array_intersect_key($params, $this->sdk->Action)
        );

        return $this->sdk->DoAction();
    }
889506
public static function cancel()
  {
    if (is_null(self::$_transaction)) {
      $result = false;
    } else {
      $result = true;

      $aTran = self::$_transaction;
      $aCurr = $aTran->_stored;

      if (!is_null($aCurr)) {
        $names = array_keys($aTran->_data);
        foreach ($names as $name) {
          Config::clearInstance($name);
        }
      }
      
      self::_stop();
      self::$_transaction = null;
    }
    
    return $result;
  }
702714
public function cancel()
    {
        $data = $this->twisto->requestJson('POST', 'invoice/' . urlencode($this->invoice_id) . '/cancel/');
        $this->deserialize($data);
    }
508538
public synchronized void cancel() {
    for (int taskId : mJobInfo.getTaskIdList()) {
      mCommandManager.submitCancelTaskCommand(mJobInfo.getId(), taskId,
          mTaskIdToWorkerInfo.get(taskId).getId());
    }
  }