Volkszaehler\Router::handleException PHP Method

handleException() private method

Handles an exception by trying to convert it to a Response Source: Symfony\Component\HttpKernel\HttpKernel
private handleException ( Exception $e, Request $request, integer $type ) : Response
$e Exception An \Exception instance
$request Symfony\Component\HttpFoundation\Request A Request instance
$type integer The type of the request (for Symfony compatibility, not implemented)
return Symfony\Component\HttpFoundation\Response A Response instance
    private function handleException(\Exception $e, $request, $type)
    {
        if (null === $this->view) {
            $this->view = new View\JSON($request);
            // fallback view instantiates error handler
        }
        return $this->view->getExceptionResponse($e);
    }