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

getTemplateForException() private method

Maps an exception to a template.
private getTemplateForException ( Exception $exception ) : string | null
$exception Exception
return string | null
    private function getTemplateForException(\Exception $exception)
    {
        foreach ($this->mapper as $class => $template) {
            if ($exception instanceof $class) {
                return $template;
            }
        }
        return null;
    }