<?php
+/*
+ (c) 2005 Joe Presbrey
+*/
function ErrorHandler($errno, $errstr, $errfile, $errline, $errcontext) {
$error_halt = true;
$error_type = 'Error';
$error_msg = " $errstr occured in $errfile on $errline at ".date("D M j G:i:s T Y");
- $email_to = 'sql@mit.edu';
+ $email_to = 'sql-team@mit.edu';
$email_from = 'sql@sql.mit.edu';
switch($errno) {
case E_USER_NOTICE:
}
$error_bt = ErrorBacktrace(debug_backtrace());
$error_msg = $type . ':' . $error_msg . "\n" . $error_bt . "\n\n";
- if (DEVEL && 0) {
- echo nl2br($error_msg);
+ if (DEVEL) {
+ echo '<table width="100%" bgcolor="white"><tr><td><pre>'.$error_msg.'</pre></td></tr></table>';
} else {
+ $error_msg .= print_r(get_included_files(),1)."\n";
$error_msg .= print_r($errcontext,1);
error_log($error_msg, 1, $email_to);
if ($error_halt) {