php.net |  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
Votes:2
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: info at netmosfera dot it
New email:
PHP Version: OS:

 

 [2009-01-17 12:40 UTC] 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



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-23 21:14 UTC] 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.
 [2018-03-10 14:27 UTC] cmb@php.net
-Status: Open +Status: Feedback -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: cmb
 [2018-03-10 14:27 UTC] cmb@php.net
> 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: Sat Apr 20 14:01:29 2024 UTC