Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67216 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15465 invoked from network); 30 Apr 2013 13:59:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Apr 2013 13:59:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=amaury.bouchard@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=amaury.bouchard@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.128.52 as permitted sender) X-PHP-List-Original-Sender: amaury.bouchard@gmail.com X-Host-Fingerprint: 209.85.128.52 mail-qe0-f52.google.com Received: from [209.85.128.52] ([209.85.128.52:36917] helo=mail-qe0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 27/74-18873-55ECF715 for ; Tue, 30 Apr 2013 09:59:50 -0400 Received: by mail-qe0-f52.google.com with SMTP id q19so296082qeb.11 for ; Tue, 30 Apr 2013 06:59:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=Drjhdx8JFiFl8e7atrf/UEdRSazK4TnZKTJntrDRqG4=; b=ygLRSgL6ZbdvEwY8Nbz/2ZLXQpAfV5EeFdqhv46IMQ2+BB/TqLQgXoP7dmAPmtHhHe 5f7Wr30lG/QjNLRvP8mFiFWj69GgNWQCuhIBdsb7M9lmoro8naG/uEdZsVnB/BhBL8cC zld1DueBeOtMttNXxcC/ckaZv4oZZhVRubxDjlptpF6VmtbWIXl0z6F7m0g9ANQSqrKl 9GIEj7jf3SFfr3MmqRxjsSt3HKCNbXzOqi6058cEsbt/jk9aX64vg0apkFrrkUVvFbH1 sJpEU8q/wimPqVc4PF49bTq/m8Q/PKkOIlmyyCNLolmEtlnXPhmq0TABMQOKblw5CVw0 lORQ== X-Received: by 10.229.141.129 with SMTP id m1mr6109486qcu.29.1367330386925; Tue, 30 Apr 2013 06:59:46 -0700 (PDT) MIME-Version: 1.0 Sender: amaury.bouchard@gmail.com Received: by 10.49.49.133 with HTTP; Tue, 30 Apr 2013 06:59:25 -0700 (PDT) In-Reply-To: <517E9F47.4080100@sugarcrm.com> References: <1367221266.2723.181.camel@guybrush> <517E9F47.4080100@sugarcrm.com> Date: Tue, 30 Apr 2013 15:59:25 +0200 X-Google-Sender-Auth: amr4Btam2PVi3KpZzitaOmpFK2A Message-ID: To: Stas Malyshev Cc: =?ISO-8859-1?Q?Johannes_Schl=FCter?= , Julien Pauli , PHP Internals Content-Type: multipart/alternative; boundary=90e6ba30949a00fbaa04db946ac8 Subject: Re: [PHP-DEV] Continued try blocks From: amaury@amaury.net (Amaury Bouchard) --90e6ba30949a00fbaa04db946ac8 Content-Type: text/plain; charset=ISO-8859-1 2013/4/29 Stas Malyshev > I agree. If your code can handle the problem, it should not throw. If it > throws, the control should not go back there, since the code already > gave up and declared it can not continue doing whatever it was doing. > Exceptions are meant to handle exceptional situations, not serve as a > kind of goto with objects, IMO, and if the code threw an exception, it > should be done. > It's a point of view, not something the language should enforce. You may have a lib/object/chunk of code which raises exceptions, because its developer thought some error is not recoverable; but when you use it, you don't want to break your program's execution. It happens. --90e6ba30949a00fbaa04db946ac8--