Core/Core/Core.php
protected function notFound(NotFoundException $e)
    {
        if (isset($this->hooks['not.found'])) {
            return $this->hooks['not.found']($e);
        } else {
            return (new Response())
                ->setStatusCode(404)
                ->setBody($e->getMessage());
        }
    }
protected function notFound(NotFoundException $e)
    {
        if (isset($this->hooks['not.found'])) {
            return $this->hooks['not.found']($e);
        } else {
            return (new Response())
                ->setStatusCode(404)
                ->setBody($e->getMessage());
        }
    }
protected function notFound ( NotFoundException $ e ) { if ( isset ( $ this -> hooks [ 'not.found' ] ) ) { return $ this -> hooks [ 'not.found' ] ( $ e ) ; } else { return ( new Response ( ) ) -> setStatusCode ( 404 ) -> setBody ( $ e -> getMessage ( ) ) ; } }
Handle 404.

@param NotFoundException $e
@return ResponseInterface
Handle 404 .