note 90874 added to function.set-error-handler
| From: | nsg at osu1 dot php dot net | Date: | Wed, 13 May 2009 23:58:35 +0000 |
| Subject: | note 90874 added to function.set-error-handler | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-154575@lists.php.net to get a copy of this message | ||
If using E_USER_ERROR in conjunction with a custom error-handler, we are faced with an annoying
choice:
If you choose to die() on such errors, __destruct()ors can still function, but we can't then
return false and have the inbuilt handler log the error.
If you return false thus allowing the error to be logged, the script will halt, exit() style, and
__destruct()'s won't happen.
It seems the only solutions in such a case is to a) log your own errors, or b) don't use
E_USER_ERROR.
----
Server IP: 92.48.74.199
Probable Submitter: 88.109.234.160
----
Manual Page -- http://www.php.net/manual/en/function.set-error-handler.php
Edit -- https://master.php.net/note/edit/90874
Del: integrated -- https://master.php.net/note/delete/90874/integrated
Del: useless -- https://master.php.net/note/delete/90874/useless
Del: bad code -- https://master.php.net/note/delete/90874/bad+code
Del: spam -- https://master.php.net/note/delete/90874/spam
Del: non-english -- https://master.php.net/note/delete/90874/non-english
Del: in docs -- https://master.php.net/note/delete/90874/in+docs
Del: other reasons-- https://master.php.net/note/delete/90874
Reject -- https://master.php.net/note/reject/90874
Search -- https://master.php.net/manage/user-notes.php