src/TwigPresenter.php
private function displayError(Request $request,Response $response){
        $exception=$response->getContent();

        $data=array(
            'statusCode'=>$response->getStatusCode()
        ,'message'=>$exception->getMessage()
        ,'exception'=>get_class($exception)
        ,'file'=>$exception->getFile()
        ,'line'=>$exception->getLine()
        );

        if($this->environment->isDebug()){
            echo $this->twig->render('error.twig', $data);
        }
        else{
            echo $this->twig->render($response->getStatusCode().'.twig');
        }
    }
private function displayError(Request $request,Response $response){
        $exception=$response->getContent();

        $data=array(
            'statusCode'=>$response->getStatusCode()
        ,'message'=>$exception->getMessage()
        ,'exception'=>get_class($exception)
        ,'file'=>$exception->getFile()
        ,'line'=>$exception->getLine()
        );

        if($this->environment->isDebug()){
            echo $this->twig->render('error.twig', $data);
        }
        else{
            echo $this->twig->render($response->getStatusCode().'.twig');
        }
    }
private function displayError ( Request $ request , Response $ response ) { $ exception = $ response -> getContent ( ) ; $ data = array ( 'statusCode' => $ response -> getStatusCode ( ) , 'message' => $ exception -> getMessage ( ) , 'exception' => get_class ( $ exception ) , 'file' => $ exception -> getFile ( ) , 'line' => $ exception -> getLine ( ) ) ; if ( $ this -> environment -> isDebug ( ) ) { echo $ this -> twig -> render ( 'error.twig' , $ data ) ; } else { echo $ this -> twig -> render ( $ response -> getStatusCode ( ) . '.twig' ) ; } }
Support status code 4XX-5XX.

@param Request $request
@param Response $response
Support status code 4XX - 5XX .