private function renderNotFound(GetResponseForExceptionEvent $event, $template, array $context = [])
    {
        try {
            $html = $this->twig->resolveTemplate($template)->render($context);
            $event->setResponse(new Response($html, Response::HTTP_NOT_FOUND));
        } catch (RuntimeError $e) {
            throw new RuntimeException('Unable to render 404 page!', null, $e);
        }
    }
private function renderNotFound(GetResponseForExceptionEvent $event, $template, array $context = [])
    {
        try {
            $html = $this->twig->resolveTemplate($template)->render($context);
            $event->setResponse(new Response($html, Response::HTTP_NOT_FOUND));
        } catch (RuntimeError $e) {
            throw new RuntimeException('Unable to render 404 page!', null, $e);
        }
    }
private function renderNotFound ( GetResponseForExceptionEvent $ event , $ template , array $ context = [ ] ) { try { $ html = $ this -> twig -> resolveTemplate ( $ template ) -> render ( $ context ) ; $ event -> setResponse ( new Response ( $ html , Response :: HTTP_NOT_FOUND ) ) ; } catch ( RuntimeError $ e ) { throw new RuntimeException ( 'Unable to render 404 page!' , null , $ e ) ; } }
Render a not found template.

@param GetResponseForExceptionEvent $event
@param string|string[]              $template
@param array                        $context

@throws RuntimeException
Render a not found template .