Re: cvs: phpdoc /en/reference/errorfunc/functions restore-error-handler.xml

From: Date: Tue, 05 Apr 2005 10:45:56 +0000
Subject: Re: cvs: phpdoc /en/reference/errorfunc/functions restore-error-handler.xml
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969367452@lists.php.net to get a copy of this message
+    switch ($errno) {
+    case E_USER_ERROR:
+        echo "<b>My FATAL</b> [$errno] $errstr<br />\n";
+        echo "  Fatal error in line $errline of file $errfile";
+        echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n";
+        echo "Aborting...<br />\n";
+        exit(1);
+        break;
+    case E_USER_WARNING:
+        echo "<b>My ERROR</b> [$errno] $errstr<br />\n";
+        break;
+    case E_USER_NOTICE:
+        echo "<b>My WARNING</b> [$errno] $errstr<br />\n";
+        break;
+    default:
+        echo "My unkown error type: [$errno] $errstr<br />\n";
+        break;
+    }
The output should be changed too :) It is not a good prectice to echo WARNING in case of a NOTICE, right? David's copy of this example should also be fixed. David? Goba

« previous php.doc (#969367452) next »