Req #47136 [Opn->Fbk]: namespace reserved set_error|exception_handler
| From: | cmb@php.net | Date: | Sat, 10 Mar 2018 14:27:16 +0000 |
| Subject: | Req #47136 [Opn->Fbk]: namespace reserved set_error|exception_handler | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-214268@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=47136&edit=1
ID: 47136
Updated by: cmb@php.net
Reported by: info at netmosfera dot it
Summary: namespace reserved set_error|exception_handler
-Status: Open
+Status: Feedback
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: irrelevant
PHP Version: 5.3.0alpha3
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
> I don't understand this feature request.
Me neither. Would you please clarify?
Previous Comments:
------------------------------------------------------------------------
[2012-03-23 21:14:04] nikic@php.net
I don't understand this feature request. Do you mean that the error handler should only catch
errors thrown in that namespace? If so, then it doesn't make sense as namespaces are only a
mechanism of resolving names, they don't interfere with the main code.
------------------------------------------------------------------------
[2009-01-17 12:40:55] info at netmosfera dot it
Description:
------------
hello
is possibile to define errors/exceptions handlers
reserved to namespaces?
because argument 2 is optional maybe it is hard to write
set_error_handler("debug", E_ALL, __NAMESPACE__);
so:
// for functions:
set_error_handler(array("", "debug", __NAMESPACE__));
// for classes (static way):
set_error_handler(array("myclass", "debug", __NAMESPACE__));
// for objects:
set_error_handler(array($this, "debug", __NAMESPACE__));
thank you
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=47136&edit=1