public static function onUnhandledError($errno, $errstr, $errfile, $errline) { $flags_handled = error_reporting(); if (Charcoal_System::isBitSet($errno, $flags_handled, Charcoal_System::BITTEST_MODE_ANY)) { // create fake exception $e = new Charcoal_PHPErrorException($errno, $errstr, $errfile, $errline); // output error message to STDERR if CLI if (defined('STDERR')) { fputs(STDERR, $e); } _throw($e); } return TRUE; // Otherwise, ignore all errors }
public static function onUnhandledError($errno, $errstr, $errfile, $errline) { $flags_handled = error_reporting(); if (Charcoal_System::isBitSet($errno, $flags_handled, Charcoal_System::BITTEST_MODE_ANY)) { $errno_disp = Charcoal_System::phpErrorString($errno); echo "smarty error [errno]{$errno}({$errno_disp}) [errstr]{$errstr} [errfile]{$errfile} [errline]{$errline}" . eol(); } return TRUE; // Otherwise, ignore all errors }