Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24350 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40935 invoked by uid 1010); 12 Jul 2006 15:20:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 40920 invoked from network); 12 Jul 2006 15:20:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jul 2006 15:20:42 -0000 X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:26972] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 8C/80-34763-54315B44 for ; Wed, 12 Jul 2006 11:20:41 -0400 Received: (qmail 32667 invoked from network); 12 Jul 2006 15:13:02 -0000 Received: from localhost (HELO zeev-notebook.zend.com) (127.0.0.1) by localhost with SMTP; 12 Jul 2006 15:13:02 -0000 Message-ID: <7.0.1.0.2.20060712181246.05f91d40@zend.com> X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Date: Wed, 12 Jul 2006 18:13:52 +0300 To: Michael Wallner Cc: internals@lists.php.net In-Reply-To: <97.00.12962.7DE73B44@pb1.pair.com> References: <97.00.12962.7DE73B44@pb1.pair.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] More valuable error message handling From: zeev@zend.com (Zeev Suraski) 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