Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86551 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23242 invoked from network); 10 Jun 2015 14:37:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jun 2015 14:37:52 -0000 Authentication-Results: pb1.pair.com header.from=aaron@icicle.io; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=aaron@icicle.io; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain icicle.io designates 199.38.81.6 as permitted sender) X-PHP-List-Original-Sender: aaron@icicle.io X-Host-Fingerprint: 199.38.81.6 mercury.negativeion.net Received: from [199.38.81.6] ([199.38.81.6:62317] helo=mercury.negativeion.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CD/11-15306-EBB48755 for ; Wed, 10 Jun 2015 10:37:51 -0400 Received: from localhost (localhost [127.0.0.1]) by mercury.negativeion.net (Postfix) with ESMTP id 1561D264A982; Wed, 10 Jun 2015 10:37:47 -0400 (EDT) X-Virus-Scanned: amavisd-new at negativeion.net Received: from mercury.negativeion.net ([127.0.0.1]) by localhost (mercury.negativeion.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id szoC5eRns7K6; Wed, 10 Jun 2015 10:37:45 -0400 (EDT) Received: from macpro.local (unknown [173.225.158.77]) by mercury.negativeion.net (Postfix) with ESMTPSA id 25151264A967; Wed, 10 Jun 2015 10:37:45 -0400 (EDT) Content-Type: multipart/alternative; boundary="Apple-Mail=_A264EB4F-B8AA-4F58-92BA-502FFA8BD946" Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) In-Reply-To: Date: Wed, 10 Jun 2015 09:37:44 -0500 Cc: internals@lists.php.net Message-ID: <3ABC8A48-D19E-4437-8F9F-658460822CE8@icicle.io> References: <971AB39D-1E20-43E8-9CF1-A7F67E3C14C3@icicle.io> <556363D3.1040902@gmail.com> <12C3389A-AFF5-42CA-8190-E4227309DAED@icicle.io> To: Dmitry Stogov X-Mailer: Apple Mail (2.2098) Subject: Re: [PHP-DEV] [RFC] Throwable Interface From: aaron@icicle.io (Aaron Piotrowski) --Apple-Mail=_A264EB4F-B8AA-4F58-92BA-502FFA8BD946 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 10, 2015, at 2:37 AM, Dmitry Stogov wrote: >=20 > I also like EngineException more than Error. >=20 I think EngineException has a couple of problems with it: 1) EngineException doesn=E2=80=99t really accurately represent the = reason for the error. For example, passing the wrong type to a function isn=E2=80=99t an = =E2=80=98engine' problem, it=E2=80=99s an error in user code. In the future it may be desirable to add more = classes in this exception branch, and I think a more general name would be more = desirable. 2) The name EngineException implies it descends from Exception. I worry = that this will cause a lot of confusion for users thinking they have to be = catching Exceptions when the problem is actually an error in their code. Discussing why you = should not catch Error objects is easier than trying to explain why certain = Exception objects should not be caught. Error is best choice for the name of the second exception branch. It has = precedent in other languages and is less likely to cause confusion. Most user code = that would collide with the name is likely very outdated, but still could easily be = updated in only a few minutes. Regards, Aaron Piotrowski= --Apple-Mail=_A264EB4F-B8AA-4F58-92BA-502FFA8BD946--