Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77792 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26035 invoked from network); 6 Oct 2014 22:12:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Oct 2014 22:12:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=lars@strojny.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lars@strojny.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain strojny.net from 46.4.40.248 cause and error) X-PHP-List-Original-Sender: lars@strojny.net X-Host-Fingerprint: 46.4.40.248 milch.schokokeks.org Received: from [46.4.40.248] ([46.4.40.248:59990] helo=milch.schokokeks.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/C3-30869-5D313345 for ; Mon, 06 Oct 2014 18:12:39 -0400 Received: from lstrojnypro4.fritz.box (ppp-93-104-72-223.dynamic.mnet-online.de [::ffff:93.104.72.223]) (AUTH: PLAIN lars@schokokeks.org, TLS: TLSv1/SSLv3,256bits,ECDHE-RSA-AES256-SHA) by milch.schokokeks.org with ESMTPSA; Tue, 07 Oct 2014 00:12:33 +0200 id 0000000000000027.00000000543313D2.00006900 Content-Type: multipart/signed; boundary="Apple-Mail=_24A236F9-DD98-4F4F-BE2F-4B39A2088042"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: Date: Tue, 7 Oct 2014 00:12:31 +0200 Cc: PHP internals Message-ID: <9CFCFC24-A670-4DBC-8042-C073B62958A2@strojny.net> References: To: Nikita Popov X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] [RFC] Exceptions in the engine From: lars@strojny.net (Lars Strojny) --Apple-Mail=_24A236F9-DD98-4F4F-BE2F-4B39A2088042 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi Nikita, On 06 Oct 2014, at 23:53, Nikita Popov wrote: [...] > As such I'm re-proposing this RFC for inclusion in PHP 7: >=20 > https://wiki.php.net/rfc/engine_exceptions_for_php7 >=20 > The RFC text is essentially the same as previously, with the primary > difference being that parse errors are now converted to exceptions as = well. > This was previously not possible due to limitations in the compiler = design. I very much like the idea of making fatal errors exceptions, so: thumbs = up! Is there a way to introduce different exception classes for = different errors. E.g. - UndefinedMethodException for stdClass::method() - NullPointerException for null::method() - UndefinedFunctionException for invalid_function() - etc. They could all extend EngineException to have a common base class but I = am sure we could find good abstractions for an exception inheritance = tree. What do you think? cu, Lars --Apple-Mail=_24A236F9-DD98-4F4F-BE2F-4B39A2088042 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIVAwUBVDMTzyQPF+sCY6wHAQJyhhAAmKd28Ndf0RsaiPD+upD+BDudEOSgsK8a RRUCd8UkaaqcJz28+NyR1MUuwzU58YLNHcdoMqRXHFybL8S1leMLaQSBZkrSLvGg XLoO8dTmEoXsV+DyyISXAbj/+xsiDukIOk9cHeMl80kaotOtOkCOD5d2on5fgvga oEZzcEOYXDsmiVhg8efuAlFlSzkiFFezr2PYHq/EEtEVgcmXHvUU18ww/nRG5zCu Ta+x3poZ757WttGF2VPJvrthlg4xM3lkg9WNleFBUxV8FzsKsAROQ1CKrO+HafA3 jcJ16WCXBX44SiGIKIB9ki3ePVPRL0wywJY7g4+XOuWXiR7QfxAqqQ+P9HsuB9n0 MT6IQvuEY8SPYVFYxAdkQU4l07yVHUeLI6CIBvuq+sJmn16SOMfyH1hzpo9yRdx/ KMn+JznOmT3/dCnz0xj+2i234CgqI5kcdBayOoMb01/uD5ZYmmluwRkXiquzpVyb NarP7Lh2YGgMDyl0EmePfIjF3Rb/nYDpwCeFZLc3bSfkgTRVMofZrL2pW0RnNlUw shRJ30do7nyaXbECZNtDfX6eA+TNOMtzqBlZLoOQb9bsfO5ryNcBqK3p2L9VOsxe /he9i7iQ9vOs4coi7VJ3P4g+AS5MUhBAq6rZhgT/MOhHi4LL6WYy0e3x+kAMXuar D5rtUDg5tN4= =js4B -----END PGP SIGNATURE----- --Apple-Mail=_24A236F9-DD98-4F4F-BE2F-4B39A2088042--