Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45077 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3962 invoked from network); 24 Jul 2009 14:29:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2009 14:29:45 -0000 Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.152 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 72.14.220.152 fg-out-1718.google.com Received: from [72.14.220.152] ([72.14.220.152:15337] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5D/5C-39659-855C96A4 for ; Fri, 24 Jul 2009 10:29:44 -0400 Received: by fg-out-1718.google.com with SMTP id e12so455829fga.0 for ; Fri, 24 Jul 2009 07:29:41 -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=TyUDDmJzYkc/YTWBNeYJAfGki8Um6VoOpfftFo4FIxE=; b=NKONa8q+AxxdTRBiCyPc88Nl9B0DkHLto9Vp/Fx7uyuDnfBh0bVbRxUilXV3n12GEu /tr/iuIC0oC76zQxSS4GoTof8hquPbsZAUHoxz2r4AiTWz8p7iO8o74qWpe/CrCeRgfI NXpT20kOd/+9I7ZzqQa3zOx6qyZzXYZ4/9jPc= 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=jy+kWScfgvlTWhSpyVWBSrm6sc2oQ7IJCgQ+ADwzrCUQjqGkwjdPK7vcdohr7z3e/T X9BuFzqpeRelYzjoTk8ka83yPgffDVDpecMlLw/UufPsk9cMBSZ//QDz0DYLgTHWHUPS FXqRjsWmUL9vRt+fQxl0naNdVfAqn0DbiYoLI= MIME-Version: 1.0 Received: by 10.86.84.6 with SMTP id h6mr2991522fgb.35.1248445780917; Fri, 24 Jul 2009 07:29:40 -0700 (PDT) In-Reply-To: References: <2dedb8a0907240640i118d220fte7ed4e0285aae024@mail.gmail.com> Date: Fri, 24 Jul 2009 16:29:40 +0200 Message-ID: <7f3ed2c30907240729i16a07871q2eb165c36f27752c@mail.gmail.com> To: "Ben Scholzen 'DASPRiD'" Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: Replacing errors with Exceptions From: hannes.magnusson@gmail.com (Hannes Magnusson) 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? 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