Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45101 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10830 invoked from network); 27 Jul 2009 03:12:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jul 2009 03:12:01 -0000 Authentication-Results: pb1.pair.com header.from=ceo@l-i-e.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ceo@l-i-e.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain l-i-e.com designates 67.139.134.202 as permitted sender) X-PHP-List-Original-Sender: ceo@l-i-e.com X-Host-Fingerprint: 67.139.134.202 o2.hostbaby.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from [67.139.134.202] ([67.139.134.202:1892] helo=o2.hostbaby.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/00-05387-F261D6A4 for ; Sun, 26 Jul 2009 22:51:33 -0400 Received: (qmail 55057 invoked by uid 98); 27 Jul 2009 02:44:17 -0000 Received: from localhost by o2.hostbaby.com (envelope-from , uid 1013) with qmail-scanner-2.05 (clamdscan: 0.88.7/9615. Clear:RC:1(127.0.0.1):. Processed in 0.084015 secs); 27 Jul 2009 02:44:17 -0000 Received: from localhost (HELO l-i-e.com) (127.0.0.1) by localhost with SMTP; 27 Jul 2009 02:44:16 -0000 Received: from webmail (SquirrelMail authenticated user ceo@l-i-e.com) by www.l-i-e.com with HTTP; Sun, 26 Jul 2009 21:44:16 -0500 (CDT) Message-ID: <2793.98.193.1248662656.squirrel@www.l-i-e.com> In-Reply-To: References: <2dedb8a0907240640i118d220fte7ed4e0285aae024@mail.gmail.com> <7f3ed2c30907240729i16a07871q2eb165c36f27752c@mail.gmail.com> Date: Sun, 26 Jul 2009 21:44:16 -0500 (CDT) To: "Alexey Zakhlestin" Cc: "Hannes Magnusson" , "Ben Scholzen 'DASPRiD'" , internals@lists.php.net User-Agent: Hostbaby Webmail MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] RFC: Replacing errors with Exceptions From: ceo@l-i-e.com ("Richard Lynch") On Fri, July 24, 2009 9:35 am, Alexey Zakhlestin wrote: > On Fri, Jul 24, 2009 at 6:29 PM, Hannes > Magnusson wrote: >> On Fri, Jul 24, 2009 at 15:43, Ben Scholzen >> 'DASPRiD' wrote: >>> To you both, this is especially, for library code like Zend >>> Framework. >>> The library cannot expect the user to have the error handle set, so >>> it >>> would have to replace the error handler before every line which it >>> wants >>> to try {} and reset it after the catch. This is not really a clean >>> solution, at it can occur pretty often. >> >> Why do you have to replace it? > > because in case of a library, there is a "third-party" called "user". > User might have his own opinion on error-handlers. And then, there's > even worse case, when there are 2 or three libraries mixed in the > single project Construct your error-handler to "stack" nicely and throw or trigger_error whatever would have happened without it. Then you need not unset/reset the silly thing. -- Some people ask for gifts here. I just want you to buy an Indie CD for yourself: http://cdbaby.com/search/from/lynch