Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45078 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5333 invoked from network); 24 Jul 2009 14:35:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2009 14:35:17 -0000 Authentication-Results: pb1.pair.com header.from=indeyets@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=indeyets@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.210 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: indeyets@gmail.com X-Host-Fingerprint: 209.85.220.210 mail-fx0-f210.google.com Received: from [209.85.220.210] ([209.85.220.210:51592] helo=mail-fx0-f210.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 89/AC-39659-1A6C96A4 for ; Fri, 24 Jul 2009 10:35:13 -0400 Received: by fxm6 with SMTP id 6so1510669fxm.23 for ; Fri, 24 Jul 2009 07:35:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=B5lPgfeoT9m3BbOdRMweL08nultcCGawnRWCP+0z3yU=; b=EA+6DM0xPgiIo0pCZrNaufFigS6Lmvh4KxZRfmg2ZLM9Mf1bzE1i0KloXJDEbbdymH YnuonGoRbN56CIklXwU40WW61gzLAt3mDwEJEsvDSGBudH5fEc2jyeXVDDtSPE9YVKnn D4wDV5SbN+V4XAfao7sbY7gjnGRw5EbV3Kseg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=wB6VghnuTC4MBPoZYx+AJNEsWUBvl2pPaUXz2e6VxExPnI1BJbxebsK0a1vZVUaEVu XZr7GFbHGIOatugDVV1hmvZ4eWWQOeVWjgBRF5MZ4wmRrsKl+9FQa83Nx1jdMrKJEhP5 14QZPxTBMYU6JOm3OkiuMhBGxultNcGzEYb5I= MIME-Version: 1.0 Received: by 10.239.164.83 with SMTP id s19mr302637hbd.110.1248446109891; Fri, 24 Jul 2009 07:35:09 -0700 (PDT) In-Reply-To: <7f3ed2c30907240729i16a07871q2eb165c36f27752c@mail.gmail.com> References: <2dedb8a0907240640i118d220fte7ed4e0285aae024@mail.gmail.com> <7f3ed2c30907240729i16a07871q2eb165c36f27752c@mail.gmail.com> Date: Fri, 24 Jul 2009 18:35:09 +0400 Message-ID: To: Hannes Magnusson Cc: "Ben Scholzen 'DASPRiD'" , internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: Replacing errors with Exceptions From: indeyets@gmail.com (Alexey Zakhlestin) 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 > You RFC says you want to throw exceptions for all E_WARNINGs - thats > exactly the same as *not* restoring it. > Just register errorhandler for E_WARNING and thats it. > > The libxml extension already has functionality to suppress XML errors, > so your simplexml_load_file() example is bogus. > Better example is fopen() on network failures, but even then I don't > understand the problem. > > > -Hannes > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Alexey Zakhlestin http://www.milkfarmsoft.com/ Sent from St Petersburg, Russian Federation