+ 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
