From: moodler Date: Wed, 13 Sep 2006 08:41:12 +0000 (+0000) Subject: Deleted the moodle_error_handler after reading the docs more. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4b743adbc309406fca6dfe3ef33d99ab68d529a7;p=moodle.git Deleted the moodle_error_handler after reading the docs more. it's not really as useful as I thought it might be --- diff --git a/lib/weblib.php b/lib/weblib.php index a35301a5b2..9c7a5577ae 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -5217,41 +5217,6 @@ function page_doc_link($text='', $iconpath='') { return $str; } -function moodle_error_handler($errno, $errstr, $errfile, $errline) { - global $CFG; - - switch ($errno) { - case E_USER_ERROR: - if ($CFG->debug > E_USER_ERROR) { - echo "FATAL ERROR: [$errno] $errstr
\n"; - echo " Fatal error in line $errline of file $errfile"; - echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")
\n"; - echo "Stack trace...
\n"; - if (function_exists('debug_print_backtrace')) { - debug_print_backtrace(); - } else { - print_object(debug_backtrace()); - } - echo "

Aborting...

\n"; - exit(1); - } - break; - case E_USER_WARNING: - if ($CFG->debug > E_USER_WARNING) { - echo "WARNING [$errno] $errstr
\n"; - } - break; - case E_USER_NOTICE: - if ($CFG->debug > E_USER_NOTICE) { - echo "NOTICE [$errno] $errstr
\n"; - } - break; - default: - echo "Unknown error type: [$errno] $errstr
\n"; - break; - } -} - // vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140: ?>