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);
    }