Re: More valuable error message handling

From: Date: Wed, 12 Jul 2006 15:13:52 +0000
Subject: Re: More valuable error message handling
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-24350@lists.php.net to get a copy of this message
I think that error_get_last() makes sense, but not the other two. You can fairly easily implement that using an error handler if you'd like, and as Andi said, keeping track of all of the errors that happened on a production server doesn't make sense from a performance (and possibly even memory) perspective(s). Zeev At 13:35 11/07/2006, Michael Wallner wrote:
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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.internals (#24350) next »