Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93402 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4314 invoked from network); 19 May 2016 19:47:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 May 2016 19:47:55 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.47 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.47 mail-wm0-f47.google.com Received: from [74.125.82.47] ([74.125.82.47:38495] helo=mail-wm0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7F/63-05406-A681E375 for ; Thu, 19 May 2016 15:47:54 -0400 Received: by mail-wm0-f47.google.com with SMTP id n129so51400528wmn.1 for ; Thu, 19 May 2016 12:47:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=0xRiK8JOReYoFHdgsv6CkeRy39oEFwSGRNVBraJMEj0=; b=HRD8gnCXOxU4j844vLwZ/kYp+Gx+U73b6Y5sPRfQi7fYW9lNqEBqL2skzaNhHum3Gj FpKuRbOjRTYdik//01jg9qFN0ZyIjpbM4tB7Ey4wT954210eQLEnbCyCIdLJn07ZLvWc b91lZuYs9OAXQSz3i0PgL1oLlnex3+M6qDU6y59rsZy+JNEzeeJvj5T2Nbrwug/RTmoZ S5MySOQ1jmN+uXXnFT5cM9FGnWhZ6HXBBKhC9tti4+ioMj4pjyEGy6od8O7F4wH4Ff7H n2M/lY+zaxanbBYIusPHo5XzBzAT3Rzhxuz88mFHX/UTccg2MvGKm8NYEv39MWbYFM9Q Y5iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=0xRiK8JOReYoFHdgsv6CkeRy39oEFwSGRNVBraJMEj0=; b=DlOxZ9dDIjKHnSPoWHoxgY2MY91sdh+Spys6hVvk3CSLSl0mV7VwwSnqy+Ggn7i3Es zAmdM9cY5+pywU3xN4iqL+eogtAUZD6lYEbIFx85+CGBNFZzkn5Qp7cdhMkcvByCa35M HMLFy6Zl2lggGJXGJ/tvjjGF/amV4xmDKLvfAOM8yPtTNOeTg/UjAz9GD4OFsx1vDZ5h 17AdFx8U+aH8fsB666NyLduuaEOErnEcg8MSvPZ7MrGamW4q5ZaL3vAhYCH95Kn6mYQH 0+i5g9sxLkghC9icInxdmYVzl2pAahjRqEgYLJTjbm0SXiS75pCrUBPuJ7YMaQnOsnH6 KsSA== X-Gm-Message-State: AOPr4FV7UxhCE9yIkTjQTZApI3BIwNAVyqXtwwADLdYuQIHDB77UI+wU1prNvuFX5itJKA== X-Received: by 10.28.167.193 with SMTP id q184mr16225571wme.63.1463687271083; Thu, 19 May 2016 12:47:51 -0700 (PDT) Received: from [192.168.1.189] ([2.27.88.132]) by smtp.googlemail.com with ESMTPSA id p129sm829967wmd.13.2016.05.19.12.47.50 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 May 2016 12:47:50 -0700 (PDT) To: internals@lists.php.net References: <72f547d6-5fcf-3cd2-960d-cb612a429e47@php.net> Message-ID: <914fa1d6-9fae-51b2-9246-526eb5c01bc7@gmail.com> Date: Thu, 19 May 2016 20:47:41 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Exception::getLine() From: rowan.collins@gmail.com (Rowan Collins) On 19/05/2016 19:35, Rasmus Schultz wrote: > Technically, every throw is a new exception "flow" - even if you're > recycling the Exception instance, it's the throw statement that > starts the unique stack unwind from the throw site; it's where the > action happens. That's one interpretation, but it doesn't really hold up in all cases. Consider a catch statement that needs to filter more granularly than the class name; since you already mentioned PDO, I'll make an example with that: catch ( PDOException $e ) { if ( substr($e->getCode(), 0, 2) === '08' ) { $this->reconnect(); } else { throw $e; } } Of what value to a subsequent catch statement is the trace of that throw statement? And why does that "start a new exception flow", but if PDO threw different sub-classes, you could let one flow through unmodified by tightening the catch statement? Regards, -- Rowan Collins [IMSoP]