More valuable error message handling
| From: | Michael Wallner | Date: | Tue, 11 Jul 2006 10:35:09 +0000 |
| Subject: | More valuable error message handling | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-24328@lists.php.net to get a copy of this message | ||
Hi,
I think many people agree that PHPs means for a developer to
get the last error message(s) are way suboptimal.
INI(track_errors) and $php_errormsg or hacking some error
handler magic are--despite sep. extension facilities--the
only one that come to mind, both cumbersome and unintuitive.
I therefore propose some new functionality with possibly
this 3 new functions:
- error_get_last()
Get the last error message.
- error_get_all()
Get an array of all occurred errors.
- error_clear_all()
Reset error stack.
Return values and parameters are subject to discussion, as well as
when PHP puts errors into this stack, eventually if track_errors is
enabled?
Thoughts, objections, flames?
PS: Sorry, if that comes through twice.
Regards,
--
Michael