protected function handleHttpError($code)
    {
        try {
            $template = new Template('Error/' . $code, (defined('OCTO_ADMIN') && OCTO_ADMIN ? 'admin' : null));
            $template->set('page', ['title' => 'Error ' . $code . ' - ' . Response::$codes[$code]]);
            $content = $template->render();

            $this->response->setResponseCode($code);
            $this->response->setContent($content);
        } catch (\Exception $ex) {}

        return $this->response;
    }
protected function handleHttpError($code)
    {
        try {
            $template = new Template('Error/' . $code, (defined('OCTO_ADMIN') && OCTO_ADMIN ? 'admin' : null));
            $template->set('page', ['title' => 'Error ' . $code . ' - ' . Response::$codes[$code]]);
            $content = $template->render();

            $this->response->setResponseCode($code);
            $this->response->setContent($content);
        } catch (\Exception $ex) {}

        return $this->response;
    }
protected function handleHttpError ( $ code ) { try { $ template = new Template ( 'Error/' . $ code , ( defined ( 'OCTO_ADMIN' ) && OCTO_ADMIN ? 'admin' : null ) ) ; $ template -> set ( 'page' , [ 'title' => 'Error ' . $ code . ' - ' . Response :: $ codes [ $ code ] ] ) ; $ content = $ template -> render ( ) ; $ this -> response -> setResponseCode ( $ code ) ; $ this -> response -> setContent ( $ content ) ; } catch ( \ Exception $ ex ) { } return $ this -> response ; }
Handle HTTP error

@param $code
@return mixed
Handle HTTP error