Reports an Error Issue raised by a Review.

@param  string              $message
@param  ReviewInterface     $review
@param  ReviewableInterface $subject
@return Reporter
502636
public function error($message, ReviewInterface $review, ReviewableInterface $subject)
    {
        $this->report(Issue::LEVEL_ERROR, $message, $review, $subject);

        return $this;
    }
32374
public static function forMessage(Message $message)
    {
        $exception = new static('Missing publisher for message of class ' . get_class($message));
        $exception->tacticianMessage = $message;

        return $exception;
    }
1035852
public function error($message)
    {
        if ($this->logger) {
            $this->logger->error($message);
        }
        if (!$this->debug) {
            throw new \RuntimeException($message);
        }
    }
929744
public static function fromException(Message $message, \AMQPException $exception)
    {
        $exception = new static('A AMQP exception occured while publishing the message', 0, $exception);
        $exception->tacticianMessage = $message;

        return $exception;
    }
813385
public function review(ReporterInterface $reporter, ReviewableInterface $file)
    {
        $bin = str_replace(['/', '\\'], DIRECTORY_SEPARATOR, 'vendor/bin/phpcs');
        $cmd = $bin . ' --report=json ';

        if ($this->getOptionsForConsole()) {
            $cmd .= $this->getOptionsForConsole();
        }

        $cmd .= $file->getFullPath();

        $process = $this->getProcess($cmd);
        $process->run();

        if (! $process->isSuccessful()) {
            // Create the array of outputs and remove empty values.
            $output = json_decode($process->getOutput(), true);

            $filter = function ($acc, $file) {
                if ($file['errors'] > 0 || $file['warnings'] > 0) {
                    return $acc + $file['messages'];
                }
            };

            foreach (array_reduce($output['files'], $filter, []) as $error) {
                $message = $error['message'] . ' on line ' . $error['line'];
                $reporter->warning($message, $this, $file);
            }
        }
    }
953239
public function error($message)
    {
        $this->message = $message;
        $this->type = 'danger';
        $this->title = 'Whoops';
        $this->icon = 'sl sl-icon-close danger ln-notify-icon';
        $this->animate['enter'] = 'animated tada';

        return $this->setNotifier();
    }
83753
public function report($level, $message, ReviewInterface $review, ReviewableInterface $subject)
    {
        $issue = new Issue($level, $message, $review, $subject);

        $this->issues->append($issue);

        return $this;
    }
687584
public function error($message, array $context = array())
    {
        if (self::isSetLogger()) {
            return self::$logger->error($message, $context);
        }

        return false;
    }
757322
public function review(ReporterInterface $reporter, ReviewableInterface $file)
    {
        $cmd = sprintf('php --syntax-check %s', $file->getFullPath());

        $process = $this->getProcess($cmd);
        $process->run();

        // Create the array of outputs and remove empty values.
        $output = array_filter(explode(PHP_EOL, $process->getOutput()));

        $needle = 'Parse error: syntax error, ';

        if (! $process->isSuccessful()) {
            foreach (array_slice($output, 0, count($output) - 1) as $error) {
                $raw = ucfirst(substr($error, strlen($needle)));
                $message = str_replace(' in ' . $file->getFullPath(), '', $raw);
                $reporter->error($message, $this, $file);
            }
        }
    }
88368
protected function _createTranslationException($message, $code = 0, \Exception $previous = null, $subject = null, TranslatorInterface $translator = null)
    {
        return new TranslationException($message, $code, $previous, $subject, $translator);
    }
164531
public function error($message, $throwable = null) {
		$this->log(\n2n\log4php\LoggerLevel::getLevelError(), $message, $throwable);
	}
893951
private function _writeError($check, $message, $lineNumber = null, $level = null) {
		if ($lineNumber === null) {
			$lineNumber = $this->lineNumber;
		}

		// If level not specified, get it in the config
		if ($level === null) {
			$level = $this->_config->getTestLevel($check);
			// If level not found in the config then WARNING by default.
			if ($level === null) {
				$level = WARNING;
			}
		}

		$this->errorCounts[$level] ++;

		$this->_reporter->writeError($lineNumber, $check, $message, $level);
	}
1075346
public function acknowledge(MessageInterface $message)
    {
        InvalidMessageException::assertMessageInstanceOf($message, DbalMessage::class);

        $this->dbal->beginTransaction();

        $sql = sprintf(
            'SELECT id FROM %s WHERE id=:id FOR UPDATE',
            $this->connection->getTableName()
        );

        $row = $this->dbal->executeQuery(
            $sql,
            ['id' => $message->getId(), ],
            ['id' => Type::INTEGER, ]
        )->fetch();
        $affectedRows = null;
        if (count($row)) {
            try {
                $affectedRows = $this->dbal->delete($this->connection->getTableName(), ['id' => $message->getId()], [
                    'id' => Type::INTEGER,
                ]);
                $this->dbal->commit();
            } catch (\Exception $e) {
                sleep(1);
                try {
                    $affectedRows = $this->dbal->delete(
                        $this->connection->getTableName(),
                        ['id' => $message->getId()],
                        ['id' => Type::INTEGER, ]
                    );
                    $this->dbal->commit();
                } catch (\Exception $e) {
                    $this->dbal->rollBack();
                }
            }
        }
        if (1 !== $affectedRows) {
            throw new \LogicException(sprintf(
                'Expected record was removed but it is not. id: "%s"',
                $message->getId()
            ));
        }
    }
175846
private function determineErrorResponse(
        $exception,
        $message,
        ResponseInterface $response,
        ServerRequestInterface $request
    )
    {
        $applicationEvent = $this->getApplicationEvent();
        $applicationEvent->setName(self::EVENT_LIFECYCLE_ERROR);
        $applicationEvent->setRequest($request);
        $applicationEvent->setResponse($response);
        $applicationEvent->setErrorResponse($this->getResponse());

        $this->emit($applicationEvent, $exception);

        $errorResponse = $applicationEvent->getErrorResponse();

        if (!$errorResponse->getBody()->isWritable()) {
            return $errorResponse;
        }

        $content = $errorResponse->getBody()->__toString();
        if (empty($content)) {
            $errorResponse->getBody()->write($message);
        }

        return $errorResponse;
    }
861104
private function sendContactMail($email, $subject, $message)
    {
        $mailer = oxNew(Email::class);

        if ($mailer->sendContactMail($email, $subject, $message)) {
            $this->_blContactSendStatus = 1;
        } else {
            Registry::getUtilsView()->addErrorToDisplay('ERROR_MESSAGE_CHECK_EMAIL');
        }
    }
1077325
protected function _validate($subject)
    {
        $errors = $this->_getValidationErrors($subject);

        if (!$this->_countIterable($errors)) {
            return;
        }

        throw $this->_throwValidationFailedException($this->__('Validation failed'), null, null, true, $subject, $errors);
    }
452915
public function assertEmail($subject, $address) {
    $message = $this->getMailCatcherClient()->searchOne([
      Message::SUBJECT_CRITERIA => $subject,
      Message::TO_CRITERIA => $address
    ]);
    if (is_null($message)) {
      throw new Exception("Message not found.");
    }
  }