src/Router/Middleware/ErrorPage.php
protected function routeToErrorPage(ServerRequestInterface $request, ResponseInterface $response)
    {
        $errorRoute = $this->getErrorRoute($request, $response);
        
        if (!isset($errorRoute)) {
            return $response;
        }
        
        $runner = $this->router->getRunner();
        
        return $runner($request->withAttribute('route', $errorRoute), $response);
    }
protected function routeToErrorPage(ServerRequestInterface $request, ResponseInterface $response)
    {
        $errorRoute = $this->getErrorRoute($request, $response);
        
        if (!isset($errorRoute)) {
            return $response;
        }
        
        $runner = $this->router->getRunner();
        
        return $runner($request->withAttribute('route', $errorRoute), $response);
    }
protected function routeToErrorPage ( ServerRequestInterface $ request , ResponseInterface $ response ) { $ errorRoute = $ this -> getErrorRoute ( $ request , $ response ) ; if ( ! isset ( $ errorRoute ) ) { return $ response ; } $ runner = $ this -> router -> getRunner ( ) ; return $ runner ( $ request -> withAttribute ( 'route' , $ errorRoute ) , $ response ) ; }
Route to the error page

@param ServerRequestInterface $request
@param ResponseInterface      $response
@return ResponseInterface
Route to the error page