Returns a total number of errors and logs them
@return integer
160945
protected function countErrors()
    {
        $count = 0;
        foreach ($this->errors as $url => $errors) {
            $errors = array_filter($errors);
            $count += count($errors);
            $this->logErrors($url, $errors);
        }
        return $count;
    }
1167892
public function getFirstError()
    {
        if (!$this->model) {
            return false;
        }

        $errors = $this->model->getErrors()->errors();

        return (count($errors) > 0) ? $errors[0] : false;
    }
291924
public function flushAllErrors() : int
    {
        $queryBuilder = $this->getQueryBuilder();
        $affectedRows = $this->getPreparedFlushErrorQuery($queryBuilder)->execute();
        return $affectedRows;
    }
233732
public function error()
    {
        $this->errors = [
            'code'    => curl_errno($this->curl),
            'message' => curl_error($this->curl)
        ];

        return $this->error();
    }
1355187
public function getCommitErrors()
    {
        $errors = array();

        if ($this->_failed_commits) {
            foreach ($this->_failed_commits as $entity) {
                $errors[(string) $entity->getIdentifier()] = array_values($entity->getErrors()->toArray());
            }
        }

        return $errors;
    }
558054
public function getFirstError()
    {
        if (empty($this->errorMessages)) {
            return '';
        }

        reset($this->errorMessages);
        return current(current($this->errorMessages));
    }
911838
protected function _getErrorReportingLevel()
    {
        $errorReporting = E_ALL ^ E_NOTICE;
        // some 3rd party libraries still use deprecated functions
        if (defined('E_DEPRECATED')) {
            $errorReporting = $errorReporting ^ E_DEPRECATED;
        }

        if (\OxidEsales\Eshop\Core\Registry::getConfig()->isProductiveMode() && !ini_get('log_errors')) {
            $errorReporting = 0;
        }


        return $errorReporting;
    }
702736
public function exportErrors()
    {
        $ret = [];
        foreach ($this->errors as $error) {
            $ret[] = $error->export();
        }
        return $ret;
    }
791960
public function total() {
        
        if(is_null($this->totalCount)) {
            $cpt = $this->getParent()->fetchQuery($this->countQuery);
            $this->totalCount = intval($cpt['cpt']);
        }
        
        return $this->totalCount;
    }
777012
public function getErrorReport()
    {
        if (empty($this->errors)) {
            return '';
        }
        $r = "Some arguments did not pass validation:\n";
        foreach ($this->errors as $letter => $arr) {
            $r .= "  $letter : " . implode(', ', $arr) . "\n";
        }
        $r .= "\n";

        return $r;
    }
645787
public function getLastError()
    {
        if($this->redis instanceof \Swoole\Coroutine\Redis)
        {
            return $this->redis->errMsg;
        }
        else
        {
            return $this->redis->getLastError();
        }
    }
1229519
public function getErrorCodeFromHandle()
    {
        $errorNumber = null;

        if ($this->handle !== null) {
            $errorNumber = curl_errno($this->handle);
        }

        return $errorNumber === 0 ? null : $errorNumber;
    }
1191409
public function get_last_error() {
        $retErrors = sqlsrv_errors(SQLSRV_ERR_ALL);
        $errorMessage = 'No errors found';

        if ($retErrors != null) {
            $errorMessage = '';

            foreach ($retErrors as $arrError) {
                $errorMessage .= "SQLState: ".$arrError['SQLSTATE']."<br>\n";
                $errorMessage .= "Error Code: ".$arrError['code']."<br>\n";
                $errorMessage .= "Message: ".$arrError['message']."<br>\n";
            }
        }

        return $errorMessage;
    }
393136
public function getError()
    {
        if (count($this->errors) > 1) {
            trigger_error("There are multiple errors, returning only the first", E_USER_NOTICE);
        }
        
        return reset($this->errors) ?: null;
    }
1243116
public function reloadErrorJobs()
    {
        $redis = $this->getRedisChildClient();
        $count = 0;
        while ($data = $redis->rpoplpush($this->errorKey, $this->queueKey)) {
            $count++;
        }

        return $count;
    }
549222
public function errorInfo()
	{
		return array
		(
			0 => $this->driver->getSQLState(),
			1 => $this->driver->getErrorCode(),
			2 => $this->driver->getLastMessage()
		);
	}
657362
public function getFirstErrors()
    {
        $errors = array();
        foreach (array_keys($this->errors) as $name) {
            $errors[$name] = current($this->errors[$name]);
        }

        return $errors;
    }