Contao\CoreBundle\EventListener\PrettyErrorScreenListener::renderErrorScreenByException PHP Method

renderErrorScreenByException() private method

Checks the exception chain for a known exception.
private renderErrorScreenByException ( GetResponseForExceptionEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent
    private function renderErrorScreenByException(GetResponseForExceptionEvent $event)
    {
        $exception = $event->getException();
        $statusCode = $this->getStatusCodeForException($exception);
        $this->logException($exception);
        // Look for a template
        do {
            $template = $this->getTemplateForException($exception);
        } while (null === $template && null !== ($exception = $exception->getPrevious()));
        $this->renderTemplate($template ?: 'error', $statusCode, $event);
    }