public static function handleError($errno, $errstr, $errfile, $errline) { if ($errno & (E_NOTICE | E_USER_NOTICE | E_STRICT)) { Tuffy_Debug::addMessage(new Tuffy_Debug_Message("Notice", $errstr, array_slice(Tuffy_Debug::getBacktrace(), 1), Tuffy_Debug::PROBLEM)); return TRUE; } else { throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } }
/** * Adds a new warning message to the debug log, if the $debug setting is * TRUE. * * @param string $title A label for the debug message describing its data. * @param string $data The data to display. * @param int $skipExtra The number of stack frames to skip when assigning * this message a traceback. */ public static function warn($title, $data, $skipExtra = 0) { if (Tuffy::setting('debug')) { $stack = array_slice(Tuffy_Debug::getBacktrace(), 1 + $skipExtra); return Tuffy_Debug::addMessage(new Tuffy_Debug_Message($title, $data, $stack, Tuffy_Debug::PROBLEM)); } }