BackBee\Event\Listener\ExceptionListener::getErrorPageResponse PHP Method

getErrorPageResponse() private method

Returns response for rendered error page.
private getErrorPageResponse ( Exception $exception, integer $statusCode ) : Response
$exception Exception
$statusCode integer
return Symfony\Component\HttpFoundation\Response
    private function getErrorPageResponse(\Exception $exception, $statusCode)
    {
        $parameter = $this->application->getContainer()->getParameter('error.default');
        if ($this->application->getContainer()->hasParameter('error.' . $statusCode)) {
            $parameter = $this->application->getContainer()->getParameter('error.' . $statusCode);
        }
        $view = $this->getErrorTemplate($parameter);
        return new Response($this->renderer->partial($view, ['error' => $exception]), $statusCode);
    }