ErrorController.php
00001 <?php
00009 class ErrorController extends Dsao_Controller_Action
00010 {
00014 protected $_message = null;
00015
00021 public function exceptionAction()
00022 {
00023
00024 $errorHandler = $this->_getParam('error_handler');
00025
00026
00027 if (!is_object($errorHandler) || !isset($errorHandler->type))
00028 {
00029 $errorHandler = new stdClass();
00030 $errorHandler->type = null;
00031 }
00032
00033 switch ($errorHandler->type)
00034 {
00035
00036 case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
00037 case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
00038 case null:
00039 {
00040 $this->_message = 'default_error_exception_error_not_found';
00041 }
00042 break;
00043
00044
00045 default:
00046 {
00047 $this->_message = 'default_error_exception_error_exception';
00048 $this->getLog()->err($errorHandler->exception->getMessage(). "\n<br />".
00049 $errorHandler->exception->getTraceAsString());
00050 }
00051 break;
00052 }
00053 }
00054
00060 public function aclAction()
00061 {
00062 $this->_message = 'default_error_acl_error_not_found';
00063 }
00064
00070 public function privilegesAction()
00071 {
00072 $this->_message = 'default_error_privileges_error_access_denied';
00073 }
00074
00080 public function lockedAction()
00081 {
00082 $this->_message = 'default_error_account_locked';
00083 }
00084
00090 public function tokenAction()
00091 {
00092 $this->_message = 'default_error_token_error_session_token';
00093 }
00094
00100 public function postDispatch()
00101 {
00102
00103 $this->getHelper('history')->setAddToHistory(false);
00104
00105 $this->getLog()->err($this->_message);
00106 }
00107 }