note 69218 added to function.set-error-handler
| From: | dk at brightbyte dot de | Date: | Sun, 27 Aug 2006 23:09:14 +0000 |
| Subject: | note 69218 added to function.set-error-handler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-116391@lists.php.net to get a copy of this message | ||
Sometimes, you want to "catch" only some errors, and let the default handler deal with the
result. I just found out that (at least in PHP 5), the default handler will be called if you return
false (not 0 or NULL or '', but false) from your custom handler. This allows for
"chaining" handlers.
The fature was suggested in this thread:
http://www.zend.com/lists/php-dev/200405/msg00491.html
- the initial suggestion was to call the default handler if true is returned, but this was changed
later on, apperently.
----
Server IP: 66.163.161.117
Probable Submitter: 84.185.220.45
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.set-error-handler.php
Edit -- https://master.php.net/note/edit/69218
Del: integrated -- https://master.php.net/note/delete/69218/integrated
Del: useless -- https://master.php.net/note/delete/69218/useless
Del: bad code -- https://master.php.net/note/delete/69218/bad+code
Del: spam -- https://master.php.net/note/delete/69218/spam
Del: non-english -- https://master.php.net/note/delete/69218/non-english
Del: in docs -- https://master.php.net/note/delete/69218/in+docs
Del: other reasons-- https://master.php.net/note/delete/69218
Reject -- https://master.php.net/note/reject/69218
Search -- https://master.php.net/manage/user-notes.php