Contao\CoreBundle\EventListener\PrettyErrorScreenListener::handleException PHP 메소드

handleException() 개인적인 메소드

Handles the exception.
private handleException ( GetResponseForExceptionEvent $event )
$event Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent
    private function handleException(GetResponseForExceptionEvent $event)
    {
        $exception = $event->getException();
        switch (true) {
            case $this->isBackendUser():
                $this->renderBackendException($event);
                break;
            case $exception instanceof AccessDeniedHttpException:
                $this->renderErrorScreenByType(403, $event);
                break;
            case $exception instanceof NotFoundHttpException:
                $this->renderErrorScreenByType(404, $event);
                break;
            case $exception instanceof ServiceUnavailableHttpException:
                $this->renderTemplate('service_unavailable', 503, $event);
                break;
            default:
                $this->renderErrorScreenByException($event);
        }
    }