error handler
| From: | Gerard Samuel | Date: | Wed, 05 Jun 2002 02:13:32 +0000 |
| Subject: | error handler | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-100642@lists.php.net to get a copy of this message | ||
I got an error handler setup, and Im using trigger_error() to do certain things.
function errorhandler($type, $msg, $file, $line)
{
switch ($type)
{
/*
case E_NOTICE:
$exit = FALSE;
break;
*/
case E_USER_WARNING:
pretty_error_display($msg);
$exit = TRUE;
break;
case E_USER_ERROR:
error_display($msg);
break;
default:
return;
}
$date = date('D, M d Y H:i:s');
$msg = sprintf("[%s]: %s in %s on line %d\n", $date, $msg, $file, $line);
$test = error_log($msg, 3, './error/error.log');
if ($exit === TRUE) exit;
}
When I trigger and error with E_USER_ERROR, it executes error_display() but it continues to display the rest of the content for the page.
I thought E_USER_ERROR stops execution of the script.
Thanks for any input.
--
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/