Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45079 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6544 invoked from network); 24 Jul 2009 14:38:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jul 2009 14:38:27 -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 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: hannes.magnusson@gmail.com X-Host-Fingerprint: 209.85.220.210 mail-fx0-f210.google.com Received: from [209.85.220.210] ([209.85.220.210:33855] helo=mail-fx0-f210.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F5/FC-39659-267C96A4 for ; Fri, 24 Jul 2009 10:38:26 -0400 Received: by fxm6 with SMTP id 6so1512651fxm.23 for ; Fri, 24 Jul 2009 07:38:24 -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=xl+IZ6D2TT3toy2KvMu57rSZypyECEtQBVCFtlDeH9A=; b=xK0zfwtHuS8G1JmFAW0+jm1ds9CgWOm79TcCL8EL1zA/rSbuSW8Q6O9mj9nJiyW6vm lkboIci3cFXM+lTv9rfukv96yd6AeWtE5Sn5F+UpMBY8XjQlMoN3ose5uuqugt3sr58c ckhVE51rm7ZzqcLwMDfEoP/IwBpTUETvnUv98= 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=mGMhsW3fEK5I2bNHh21JtRoUlso075r1lpp1wjNqhsoLvk99FXr+X7pKqN0Hye9lHh A7Zfm42xmwX2j0JRM5P5Wlpj7tqhNt7S4WAR8tPUbvHISdnluOr7nK/DFy3ubxlw3WJH 5uifaijB7zhyHSPGkURzYHzRDTTY+P+cDd6LM= MIME-Version: 1.0 Received: by 10.86.91.5 with SMTP id o5mr3058447fgb.32.1248446303923; Fri, 24 Jul 2009 07:38:23 -0700 (PDT) In-Reply-To: References: <2dedb8a0907240640i118d220fte7ed4e0285aae024@mail.gmail.com> <7f3ed2c30907240729i16a07871q2eb165c36f27752c@mail.gmail.com> Date: Fri, 24 Jul 2009 16:38:23 +0200 Message-ID: <7f3ed2c30907240738r31e2a502gd388c9a7653f80f8@mail.gmail.com> To: Alexey Zakhlestin Cc: "Ben Scholzen 'DASPRiD'" , 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 16:35, 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 No. The RFC says it should throw Exception. There is no need for other error handlers in that case. If you want multiple error handlers then create RFC for error handler stacking. -Hannes