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);
    }
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);
    }
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 ) ; }
Returns response for rendered error page.

@param  \Exception $exception
@param  int        $statusCode

@return Response
Returns response for rendered error page .