|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #47136 namespace reserved set_error|exception_handler
Submitted: 2009-01-17 12:40 UTC Modified: 2018-06-24 04:22 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: info at netmosfera dot it Assigned: cmb (profile)
Status: No Feedback Package: *General Issues
PHP Version: 5.3.0alpha3 OS: irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: info at netmosfera dot it
New email:
PHP Version: OS:


 [2009-01-17 12:40 UTC] info at netmosfera dot it
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__);

// 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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-23 21:14 UTC]
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.
 [2018-03-10 14:27 UTC]
-Status: Open +Status: Feedback -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: cmb
 [2018-03-10 14:27 UTC]
> I don't understand this feature request.

Me neither.  Would you please clarify?
 [2018-06-24 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 19 02:01:35 2024 UTC