Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86366 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33859 invoked from network); 24 May 2015 20:11:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 May 2015 20:11:42 -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:52592] helo=mercury.negativeion.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/42-08079-D7032655 for ; Sun, 24 May 2015 16:11:42 -0400 Received: from localhost (localhost [127.0.0.1]) by mercury.negativeion.net (Postfix) with ESMTP id 5376A259D056; Sun, 24 May 2015 16:11:39 -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 82YYaTuNYaLt; Sun, 24 May 2015 16:11:38 -0400 (EDT) Received: from mars.local (unknown [173.225.150.231]) by mercury.negativeion.net (Postfix) with ESMTPSA id 52029259D047; Sun, 24 May 2015 16:11:38 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) In-Reply-To: <556221C7.8040809@mabe.berlin> Date: Sun, 24 May 2015 15:11:38 -0500 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: References: <971AB39D-1E20-43E8-9CF1-A7F67E3C14C3@icicle.io> <556221C7.8040809@mabe.berlin> To: Marc Bennewitz X-Mailer: Apple Mail (2.2098) Subject: Re: [PHP-DEV] [RFC] Throwable Interface From: aaron@icicle.io (Aaron Piotrowski) > On May 24, 2015, at 2:08 PM, Marc Bennewitz wrote: >=20 > Where are the new classes and the interface located if it's not in the = global namespace or do I muss something? Sorry if what I wrote wasn=E2=80=99t clear. Throwable, Error, TypeError, = and ParseError will be built-in interfaces/classes in the root = namespaces. So users will not be able to make classes with those exact = names, but classes with those names in a non-global namespace (e.g., = \Vendor\Package\TypeError) will still be possible. I=E2=80=99ve updated = the RFC to make this clearer. > If I remember right the TypeException/TypeError will be thrown in some = cases of internal functions with strict argument count. > In my opinion a missing argument or to much arguments has nothing to = do with the type and should have it's own Exception/Error class. I believe this actually generates a warning, it does not throw an = exception. However, this does remind me of another point: It is possible = that more classes extending Error could be created in the future for = different error reasons. Anything that throws an Error could later be = changed to throw an object extending Error without a BC break. This is a = separate issue though and could be discussed in a future RFC. Aaron Piotrowski=