_helper->layout->disableLayout(); $errors = $this->_getParam('error_handler'); if (is_object($errors)) { $exceptionTypes = array( Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE, Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER, Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION ); if (in_array($errors->type, $exceptionTypes)) { // 404 error -- controller or action not found $this->getResponse()->setHttpResponseCode(404); $this->view->message = 'Page not found
' . $errors->exception->getMessage(); $this->view->displayErrors = 1; } else { // application error $this->getResponse()->setHttpResponseCode(200); $this->view->message = 'Application error: ' . $errors->exception->getMessage(); } // conditionally display exceptions if ($this->getInvokeArg('displayExceptions') == true) { $this->view->exception = $errors->exception; } if (in_array(APPLICATION_ENV, array('development', 'testing'))) { $this->view->displayErrors = 1; } $this->view->request = $errors->request; } } }