logEvent($errno, $errstr, $errfile, $errline, $backtrace); } catch(Exception $e) { // in case the error occurs before the logger creation, we simply display it print("
$errstr \nin '$errfile' at the line $errline\n\n$backtrace\n
"); exit; } 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: exit; break; case E_WARNING: case E_NOTICE: case E_USER_WARNING: case E_USER_NOTICE: case E_STRICT: case E_RECOVERABLE_ERROR: case E_DEPRECATED: case E_USER_DEPRECATED: default: // do not exit break; } }