framework/RedKiteCms/EventSystem/Listener/Exception/ExceptionListener.php
public function onKernelException(GetResponseForExceptionEvent $event)
    {
        $exception = $event->getException();
        if ($exception instanceof AuthenticationCredentialsNotFoundException) {
            return new RedirectResponse("/login");
        }

        $message = $exception->getMessage();
        if ($exception instanceof NotFoundHttpException || $exception instanceof PageNotPublishedException) {
            $this->render404page($event, $message);

            return;
        }

        if (!$exception instanceof RedKiteCmsExceptionInterface) {
            DataLogger::log($message, DataLogger::CRITICAL);

            if ($this->debug) {
                return $event;
            }
            $this->setUpResponse($event, $message);

            return;
        }

        $message = Utils::translateException($message, $exception);
        $this->setUpResponse($event, $message);

        DataLogger::log($message, DataLogger::ERROR);
    }
public function onKernelException(GetResponseForExceptionEvent $event)
    {
        $exception = $event->getException();
        if ($exception instanceof AuthenticationCredentialsNotFoundException) {
            return new RedirectResponse("/login");
        }

        $message = $exception->getMessage();
        if ($exception instanceof NotFoundHttpException || $exception instanceof PageNotPublishedException) {
            $this->render404page($event, $message);

            return;
        }

        if (!$exception instanceof RedKiteCmsExceptionInterface) {
            DataLogger::log($message, DataLogger::CRITICAL);

            if ($this->debug) {
                return $event;
            }
            $this->setUpResponse($event, $message);

            return;
        }

        $message = Utils::translateException($message, $exception);
        $this->setUpResponse($event, $message);

        DataLogger::log($message, DataLogger::ERROR);
    }
Handles the exceptions

@param GetResponseForExceptionEvent $event