PageRenderTime 10ms CodeModel.GetById 8ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/demos/Zend/Wildfire/application/controllers/ErrorController.php

https://github.com/decaoz/zf1
PHP | 51 lines | 11 code | 7 blank | 33 comment | 0 complexity | eae35a852c419802ea2efe7820dc1a4e MD5 | raw file
 1<?php
 2/**
 3 * Zend Framework
 4 *
 5 * LICENSE
 6 *
 7 * This source file is subject to the new BSD license that is bundled
 8 * with this package in the file LICENSE.txt.
 9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
14 *
15 * @category   Zend
16 * @package    Zend_Wildfire
17 * @copyright  Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
18 * @license    http://framework.zend.com/license/new-bsd     New BSD License
19 */
20
21/**
22 * A sample error controller.
23 *
24 * @category   Zend
25 * @package    Zend_Wildfire
26 * @copyright  Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
27 * @license    http://framework.zend.com/license/new-bsd     New BSD License
28 */
29class ErrorController extends Zend_Controller_Action
30{
31    public function errorAction()
32    {
33        /*
34         * Make sure we don't log exceptions thrown during the exception logging.
35         * If we do we will create an infinite loop!
36         */
37
38        try {
39
40            Zend_Registry::get('logger')->err($this->_getParam('error_handler')->exception);
41
42        } catch(Exception $e) {
43
44          /* TODO: You can log this exception somewhere or display it during development.
45           *       DO NOT USE THE logger here as it will create an infinite loop!
46           */
47
48        }
49    }
50}
51