Skip to content

Commit

Permalink
Deleted the moodle_error_handler after reading the docs more.
Browse files Browse the repository at this point in the history
it's not really as useful as I thought it might be
  • Loading branch information
moodler committed Sep 13, 2006
1 parent e6c5492 commit 4b743ad
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions lib/weblib.php
Expand Up @@ -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 "<b>FATAL ERROR:</b> [$errno] $errstr<br />\n";
echo " Fatal error in line $errline of file $errfile";
echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n";
echo "Stack trace...<br />\n";
if (function_exists('debug_print_backtrace')) {
debug_print_backtrace();
} else {
print_object(debug_backtrace());
}
echo "<p>Aborting...</p>\n";
exit(1);
}
break;
case E_USER_WARNING:
if ($CFG->debug > E_USER_WARNING) {
echo "<b>WARNING</b> [$errno] $errstr<br />\n";
}
break;
case E_USER_NOTICE:
if ($CFG->debug > E_USER_NOTICE) {
echo "<b>NOTICE</b> [$errno] $errstr<br />\n";
}
break;
default:
echo "Unknown error type: [$errno] $errstr<br />\n";
break;
}
}


// vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
?>

0 comments on commit 4b743ad

Please sign in to comment.