Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86297 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64528 invoked from network); 18 May 2015 17:59:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 May 2015 17:59:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.68 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.68 mail-wg0-f68.google.com Received: from [74.125.82.68] ([74.125.82.68:35604] helo=mail-wg0-f68.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 19/A4-24313-6982A555 for ; Mon, 18 May 2015 13:59:51 -0400 Received: by wggy19 with SMTP id y19so1051488wgg.2 for ; Mon, 18 May 2015 10:59:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=oR5QjKORdoN293Z19y978ew17z/bhWN63Xb4UhZ5a/M=; b=rON97jPOwUkD4sY48R06bXHNSBJmcYYRYnT+N94S0yNKn9Y87y0hJYRxOlB+/zVgAn 9yImd0mgg6b8cIMmcJYPlBC/Q4nMbG4/XGSsJgc4rNkOWv6192jIwAUJG4XvLINuQXgj v9tD30ToQ+A19Fd4VifhM5pCWOQMWROL5IdbzZVaxNligcWSUc5gvi3bPzOV5AXQHWTe CsOgT8APhqqWSImuwGUiSeJRhbpDo7lKMSR/m3c7HsqLVm8PzKGk9OnPWXYibnPAubY+ gFv3NMxYTT7Rt4E4vNfzcxwFOQ/Wm+PK8elYl6lkcJtUKelIEi9SVER5vc/Dz5ISZXiu YAAA== X-Received: by 10.194.122.200 with SMTP id lu8mr45903338wjb.30.1431971988258; Mon, 18 May 2015 10:59:48 -0700 (PDT) Received: from [192.168.0.159] ([62.189.198.114]) by mx.google.com with ESMTPSA id dz4sm13526725wib.17.2015.05.18.10.59.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 May 2015 10:59:47 -0700 (PDT) Message-ID: <555A2845.3070102@gmail.com> Date: Mon, 18 May 2015 18:58:29 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Dan Ackroyd , Levi Morrison CC: internals References: <5552FF58.8070807@php.net> <55575DCF.50801@gmail.com> <55578C61.3040408@gmail.com> <555796C0.2020002@gmail.com> <5557A5C6.5050701@gmail.com> <877A3955-C72C-4DB0-9B4D-E2891EE55095@gmail.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE] Exceptions in the engine From: rowan.collins@gmail.com (Rowan Collins) Dan Ackroyd wrote on 18/05/2015 18:38: > On 18 May 2015 at 15:39, Levi Morrison wrote: >> I wouldn't group >> TypeException in the same subtree as ParseException, for instance. One >> happens at compile time and the other at run time, which means the >> intent in what you catch is probably quite different. > TypeException is also different the other EngineExceptions, as it's an > exception that people will want to throw from their own code instead > of having a separate UserLandTypeException. > > Except for testing, people shouldn't be throwing ParseException or > other EngineExceptions from their code. Hm, I think we may be getting somewhere; it does seem plausible that some specific "catchable fatal errors" in PHP 5 should actually be converted to Exceptions rather than Errors/EngineExceptions. Indeed, some of them have closely-corresponding exception classes in SPL, such as InvalidArgumentException: > Exception thrown if an argument is not of the expected type. Thus the problem is not in creating an Exception/Error distinction in the first place, but in not thinking about which cases belong on which side of the split. Regards, -- Rowan Collins [IMSoP]