From 5f343aab92ed7b77f62d0dbf19ab4146ab3ff32a Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Tue, 5 Apr 2005 11:26:15 +0000 Subject: [PATCH] get rid of confusing shortcuts git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@183650 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../errorfunc/functions/set-error-handler.xml | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/reference/errorfunc/functions/set-error-handler.xml b/reference/errorfunc/functions/set-error-handler.xml index 8f5096c35c..7d90aea491 100644 --- a/reference/errorfunc/functions/set-error-handler.xml +++ b/reference/errorfunc/functions/set-error-handler.xml @@ -1,5 +1,5 @@ - + @@ -133,31 +133,25 @@ FATAL [$errno] $errstr
\n"; + case E_USER_ERROR: + echo "My ERROR [$errno] $errstr
\n"; echo " Fatal error in line $errline of file $errfile"; echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")
\n"; echo "Aborting...
\n"; exit(1); break; - case ERROR: - echo "ERROR [$errno] $errstr
\n"; + case E_USER_WARNING: + echo "My WARNING [$errno] $errstr
\n"; break; - case WARNING: - echo "WARNING [$errno] $errstr
\n"; + case E_USER_NOTICE: + echo "My NOTICE [$errno] $errstr
\n"; break; default: echo "Unkown error type: [$errno] $errstr
\n"; @@ -170,18 +164,18 @@ function scale_by_log($vect, $scale) { if (!is_numeric($scale) || $scale <= 0) { trigger_error("log(x) for x <= 0 is undefined, you used: scale = $scale", - FATAL); + E_USER_ERROR); } if (!is_array($vect)) { - trigger_error("Incorrect input vector, array of values expected", ERROR); + trigger_error("Incorrect input vector, array of values expected", E_USER_WARNING); return null; } for ($i=0; $i