Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24328 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13954 invoked by uid 1010); 11 Jul 2006 10:35:03 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 13939 invoked from network); 11 Jul 2006 10:35:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jul 2006 10:35:03 -0000 X-Host-Fingerprint: 80.123.98.46 unknown Received: from ([80.123.98.46:29103] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 97/00-12962-7DE73B44 for ; Tue, 11 Jul 2006 06:35:03 -0400 Message-ID: <97.00.12962.7DE73B44@pb1.pair.com> To: internals@lists.php.net Date: Tue, 11 Jul 2006 12:35:09 +0200 User-Agent: Thunderbird 1.5.0.4 (X11/20060615) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 80.123.98.46 Subject: More valuable error message handling From: mike@php.net (Michael Wallner) 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