Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86289 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58384 invoked from network); 17 May 2015 13:23:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 May 2015 13:23:13 -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 209.85.212.176 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.176 mail-wi0-f176.google.com Received: from [209.85.212.176] ([209.85.212.176:33178] helo=mail-wi0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id ED/62-32673-04698555 for ; Sun, 17 May 2015 09:23:13 -0400 Received: by wicmx19 with SMTP id mx19so70285410wic.0 for ; Sun, 17 May 2015 06:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to:cc :message-id; bh=GErDTmnda0CDWrFtrj/KhFhimcJTK3GHHm8yFBu8Cao=; b=ksNTE8pOBC3e4e991OfdCgtsvGIWfvrvWQFH5efybdblqEHU/a1KBDoWEmaZ82fQfl YoSmwwAg4gSvuiz4HU0u1GwwHHJfd/IzgD2IS6ryaXmAQM0Keuk1KsH8TZTSSxKQSvP4 CYUD0NnBJqQXNX2svRSjl4uuMKm8w8wwN1hl09gXIq9fCnmc5Ny/EBOdmcoKlJw8d8g/ YU2LJORMPDFV1ZFxk+ZKeYS8+pYc16q3qaLFfIIJBKV/VGCtNkFHIcJS3653cC/hXzTS E0Pk8QrOjiYII4kDHm3A6nAFXMWuorjoCUL7kaJe7KnDQdkFfrWAkpi7KChlXaT6ARtx Zi7g== X-Received: by 10.180.20.200 with SMTP id p8mr13348945wie.78.1431868989738; Sun, 17 May 2015 06:23:09 -0700 (PDT) Received: from [192.168.0.6] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id z12sm12018499wjw.39.2015.05.17.06.23.08 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 17 May 2015 06:23:09 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: References: <55425D7E.6010803@gmail.com> <554D8F4D.9020903@gmail.com> <554D90CC.3040607@php.net> <5552E3EB.5010800@gmail.com> <5552E494.5070401@php.net> <5552FF58.8070807@php.net> <55575DCF.50801@gmail.com> <55578C61.3040408@gmail.com> <555796C0.2020002@gmail.com> <5557A5C6.5050701@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Sun, 17 May 2015 14:22:59 +0100 To: Levi Morrison CC: internals Message-ID: Subject: Re: [PHP-DEV] [VOTE] Exceptions in the engine From: rowan.collins@gmail.com (Rowan Collins) On 17 May 2015 00:48:07 BST, Levi Morrison wrote: >It's also the principle of least astonishment: why isn't TypeException >caught by `catch (Exception $e)`? This is probably a good argument in favour of "Error" as naming for engine exceptions. If you say "TypeError is not caught by catch (Exception $e)", it seems a lot less surprising. You can even say "a TypeError is Throwable, but it's not an Exception". On a practical level, it's perfectly possible to write a handling function which can process all sorts of different user land exceptions, but wouldn't have a clue what to do about an engine error. Regards, -- Rowan Collins [IMSoP]