1: <?php
2: /**
3: * This file contains the cErrorException class.
4: *
5: * @package Core
6: * @subpackage Exception
7: * @version SVN Revision $Rev:$
8: *
9: * @author Simon Sprankel
10: * @copyright four for business AG <www.4fb.de>
11: * @license http://www.contenido.org/license/LIZENZ.txt
12: * @link http://www.4fb.de
13: * @link http://www.contenido.org
14: */
15:
16: /**
17: * An Error Exception.
18: * You should use this CONTENIDO exception instead of the standard PHP
19: * {@link ErrorException}.
20: * This exception type is logged to data/logs/exception.txt.
21: */
22: class cErrorException extends cException {
23:
24: public function __construct($message, $code = 0, Exception $previous = NULL) {
25: $cfg = cRegistry::getConfig();
26:
27: // determine if exception should be logged
28: if (false === isset($cfg['debug']['log_error_exceptions'])) {
29: $this->_log_exception = true;
30: }
31:
32: if (false === $this->_log_exception) {
33: $this->_log_exception = $cfg['debug']['log_error_exceptions'];
34: }
35:
36: parent::__construct($message, $code, $previous);
37:
38: }
39:
40: }
41: