Source for file mvblog_debug.php
Documentation is available at mvblog_debug.php
* MvBlog -- An open source no-nosense blogtool
* Copyright (C) 2005-2006, Michiel van Baak
* Michiel van Baak <mvanbaak@users.sourceforge.net>
* See http://dev.mvblog.org for more information on MvBlog.
* That page also provides Bugtrackers, Filereleases etc.
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
* @copyright 2005-2006 Ferry Boender
* Debugging class that takes care of error reporting, etc.
* @var array $development_hostnames Hostnames that will turn on strict errors.
public static $development_hostnames =
array(
* @var array $error_names List of errors in int and string format.
public static $error_names =
array(
128 =>
"E_COMPILE_WARNING",
4096 =>
"E_RECOVERABLE_ERROR",
* Starts the development error reporting, which is much stricter than
* normal. This is to ensure that developers fix errors and notices that
* occur. This will only be set when the current hostname exists in the
* MvBlog_debug::$development_hostnames array.
* @param bool $warn_strict (optional) Warn/stop on strict errors?
/* Turn on heavy error reporting so that no errors go unnoticed, but
only for development hostnames. This way end-users won't accidentally get
errors they shouldn't be seeying. */
* Starts the pendantic error logging mode. Every error will stop execution
* of the script straight away. You can specify if you DON'T want Future
* errors to also stop the script.
* @param bool $warn_strict (optional) Warn/stop on strict errors?
// Asserts can be used to test preconditions in, e.g. functions. They
// are off by default. Turn them on here.
// Turn on the highest level of error reporting.
if ($warn_strict &&
defined("E_STRICT")) {
// Show errors in the source code (to annoy developers)
// Set a custom error handler that's stricter than the normal one.
* The MvBlog custom error handler. This error handler will does basically
* the same as the normal error, except that it also exists on when an
* error or notice is encountered.
* @param int $errno The php error number
* @param string $errstr The php error message
* @param string $errfile The php file where the error is
* @param int $errline The line where the error is
// Only show errors for which error reporting level is turned on.
if ($error_reporting_level & $errno) {
echo
($errtype.
" error in <b>".
$errfile.
"</b>:<b>".
$errline.
"</b> - <i>".
$errstr.
"</i>");
Documentation generated on Fri, 28 Dec 2007 13:17:40 +0100 by phpDocumentor 1.4.1