lib/Controller.php
public function routerError($error = null, $subject = null)
    {
        switch ($error) {
        case Router::ERR_NOT_FOUND:
            $status = 404;
            $template = 'router/error404';
            break;
        case Router::ERR_BAD_METHOD:
            $status = 405;
            $template = 'router/error405';
            break;
        case Router::ERR_MISSING_CONTROLLER:
        case Router::ERR_MISSING_ACTION:
        default:
            $status = 500;
            $template = 'router/error';
            break;
        }

        return $this->render($template, compact('error', 'subject'), $status);
    }
public function routerError($error = null, $subject = null)
    {
        switch ($error) {
        case Router::ERR_NOT_FOUND:
            $status = 404;
            $template = 'router/error404';
            break;
        case Router::ERR_BAD_METHOD:
            $status = 405;
            $template = 'router/error405';
            break;
        case Router::ERR_MISSING_CONTROLLER:
        case Router::ERR_MISSING_ACTION:
        default:
            $status = 500;
            $template = 'router/error';
            break;
        }

        return $this->render($template, compact('error', 'subject'), $status);
    }
public function routerError ( $ error = null , $ subject = null ) { switch ( $ error ) { case Router :: ERR_NOT_FOUND : $ status = 404 ; $ template = 'router/error404' ; break ; case Router :: ERR_BAD_METHOD : $ status = 405 ; $ template = 'router/error405' ; break ; case Router :: ERR_MISSING_CONTROLLER : case Router :: ERR_MISSING_ACTION : default : $ status = 500 ; $ template = 'router/error' ; break ; } return $ this -> render ( $ template , compact ( 'error' , 'subject' ) , $ status ) ; }
Router Error Action

@param string $error   Router::ERR_*
@param mixed  $subject Optional value for the error template

@return Response
Router Error Action