initial setup of framework code
[cacert-mgr.git] / manager / application / controllers / ErrorController.php
1 <?php
2
3 class ErrorController extends Zend_Controller_Action
4 {
5
6 public function errorAction()
7 {
8 $errors = $this->_getParam('error_handler');
9
10 switch ($errors->type) {
11 case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
12 case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
13
14 // 404 error -- controller or action not found
15 $this->getResponse()->setHttpResponseCode(404);
16 $this->view->message = 'Page not found';
17 break;
18 default:
19 // application error
20 $this->getResponse()->setHttpResponseCode(500);
21 $this->view->message = 'Application error';
22 break;
23 }
24
25 $this->view->exception = $errors->exception;
26 $this->view->request = $errors->request;
27
28 Log::Log()->emerg($errors->exception);
29 }
30
31 public function permissiondeniedAction() {
32
33 }
34 }
35