my error_handler don't catch Fatal errors.
| From: | Thomas Morin | Date: | Fri, 22 Sep 2000 13:27:46 +0000 |
| Subject: | my error_handler don't catch Fatal errors. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-17313@lists.php.net to get a copy of this message | ||
This small code (which you can copypaste in your prefered editor as
is) install an error handler with php4's set_error_handler function.
Sadly some errors are not catched.
Is this a feature or a bug ?
===============================================================
function testEH($level,$message) {
echo "$level $message<br>";
}
set_error_handler('testEH');
$notExistingObject->test();
===============================================================
outputs:
=================================================================
L 8 :: Undefined variable: nonexistingvar
@/home/dev/thomas/wmotion/rd/testpages/test01-errors.phtml:6
L 8 :: Undefined variable: notExistingObject
@/home/dev/thomas/wmotion/rd/testpages/test01-errors.phtml:6
Fatal error: Call to a member function on a non-object in
/home/dev/thomas/wmotion/rd/testpages/test01-errors.phtml on line 14
=================================================================
Thanks anyone...
-Thomas