Neos\Flow\Error\ProductionExceptionHandler::echoExceptionWeb PHP Метод

echoExceptionWeb() защищенный Метод

Echoes an exception for the web.
protected echoExceptionWeb ( object $exception ) : void
$exception object \Exception or \Throwable
Результат void
    protected function echoExceptionWeb($exception)
    {
        $statusCode = 500;
        if ($exception instanceof FlowException) {
            $statusCode = $exception->getStatusCode();
        }
        $statusMessage = Response::getStatusMessageByCode($statusCode);
        $referenceCode = $exception instanceof FlowException ? $exception->getReferenceCode() : null;
        if (!headers_sent()) {
            header(sprintf('HTTP/1.1 %s %s', $statusCode, $statusMessage));
        }
        try {
            if (isset($this->renderingOptions['templatePathAndFilename'])) {
                try {
                    echo $this->buildView($exception, $this->renderingOptions)->render();
                } catch (\Throwable $throwable) {
                    $this->renderStatically($statusCode, $throwable);
                } catch (\Exception $exception) {
                    $this->renderStatically($statusCode, $exception);
                }
            } else {
                echo $this->renderStatically($statusCode, $referenceCode);
            }
        } catch (\Exception $innerException) {
            $this->systemLogger->logException($innerException);
        }
    }
ProductionExceptionHandler