blob: 7ae1fc9d9d8d4c7d846fdfc0b7421e2420f81509 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<?php
function Piwik_ErrorHandler($errno, $errstr, $errfile, $errline)
{
ob_start();
debug_print_backtrace();
$backtrace = ob_get_contents();
ob_end_clean();
Zend_Registry::get('logger_error')->log($errno, $errstr, $errfile, $errline, $backtrace);
switch($errno)
{
case E_ERROR:
case E_PARSE:
case E_CORE_ERROR:
case E_CORE_WARNING:
case E_COMPILE_ERROR:
case E_COMPILE_WARNING:
case E_USER_ERROR:
case E_EXCEPTION:
exit;
break;
case E_WARNING:
case E_NOTICE:
case E_USER_WARNING:
case E_USER_NOTICE:
case E_STRICT:
case E_RECOVERABLE_ERROR:
default:
// do not exit
break;
}
}
?>
|