view->headTitle('Error'); //use error layout $this->_helper->layout->setLayout('error'); } /** * Formats error report with backtrace and exception dump * */ public function errorAction() { $errors = $this->_getParam('error_handler'); switch ($errors->type) { case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER: case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION: // 404 error -- controller or action not found $this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found'); $content ='

Error - 404


'; $content .='

' . $errors->exception->getMessage() . '

'; break; default: // application error $content = '

Unexpected Error!


'; $content .= '

' . $errors->exception->getMessage() . '

'; break; } // Clear previous content $this->getResponse()->clearBody(); $this->view->content = $content; $this->view->error = $errors; } } //the view content; ?>

Backtrace


Error Dump

error);?>