Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69863 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26600 invoked from network); 25 Oct 2013 09:59:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Oct 2013 09:59:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=indeyets@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=indeyets@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.54 as permitted sender) X-PHP-List-Original-Sender: indeyets@gmail.com X-Host-Fingerprint: 209.85.215.54 mail-la0-f54.google.com Received: from [209.85.215.54] ([209.85.215.54:45648] helo=mail-la0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A2/50-21970-BF04A625 for ; Fri, 25 Oct 2013 05:59:24 -0400 Received: by mail-la0-f54.google.com with SMTP id gx14so2920857lab.27 for ; Fri, 25 Oct 2013 02:59:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=wBV6Elphk1LA5KjzCKeT6M4wvYCkXojeTo8Z/vl1+T0=; b=NpENpAGaqRFCKjzUc4mc/bFY7cOAO0a8RD6pngDu3VhRrCoxZwmZ3B8eZji2aPDZ10 Q3KCl0L5X20rpIyDH1RtHSzebeezdBgwRyCENzEDskjd5SMYvveJi4atl5GwtvXyroXG dplBkcxU+KoEoy2GyCBQOLTuYczYtdboGxmnKOGIXWW5hM0ZlOHRnc/WAY0BVEHNo5ht Wm8TWFVkQUXi6wsE2dc8Moxjg6onC2X3uvSKr8Po383wDjO7uSdGG5lQF5QnzCbdJ0S1 E24i4CrGZQ/sDsrXiGAqSjqDK/8F/AS+UZvOzmBpkmVyWALDLZLwz546gH8j0/1q6AQM vcug== X-Received: by 10.112.29.147 with SMTP id k19mr1670258lbh.9.1382695160619; Fri, 25 Oct 2013 02:59:20 -0700 (PDT) Received: from [10.0.1.24] ([46.252.161.106]) by mx.google.com with ESMTPSA id vo1sm2007465lbb.1.2013.10.25.02.59.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 25 Oct 2013 02:59:18 -0700 (PDT) Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1816\)) Content-Type: multipart/signed; boundary="Apple-Mail=_6932F8AC-430B-4B6F-9DA2-EC4481F480BA"; protocol="application/pgp-signature"; micalg=pgp-sha512 In-Reply-To: Date: Fri, 25 Oct 2013 13:59:11 +0400 Cc: PHP internals Message-ID: <48695B62-3224-4A31-965D-EFFC9BD4F4D0@gmail.com> References: To: Nikita Popov X-Mailer: Apple Mail (2.1816) Subject: Re: [PHP-DEV] [RFC] Exceptions in the engine From: indeyets@gmail.com (Alexey Zakhlestin) --Apple-Mail=_6932F8AC-430B-4B6F-9DA2-EC4481F480BA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 24 =D0=BE=D0=BA=D1=82. 2013 =D0=B3., at 21:41, Nikita Popov = wrote: > I'd like to propose an RFC, which allows the use of exceptions within = the > engine and also allows changing existing fatal errors to exceptions: >=20 > https://wiki.php.net/rfc/engine_exceptions >=20 > This topic has been cropping up in the discussions for several of the > recent RFCs and I think the time has come to consider moving away from > fatal errors. >=20 > Thoughts? Thank you, Nikita! That=E2=80=99s something which definitely needs to be done. Catching parse-errors from includes, bad function/method calls, etc. = will let us make complex code-bases more robust and predictable. I think introduction of BaseException is a necessity. This way code will stay compatible and new exceptions will just end = their life somewhere in shutdown-handler, just as fatal errors do now. Rowan proposed to use subclasses for different exception types =E2=80=94 = I believe it can wait a bit. There is no need to overcomplicate this. New classes would be added eventually, but as they will be extending = EngineException forward-compatibility is preserved. converting fatal-errors is a safe-enough change to be done in 5.NEXT. converting some of the warnings is a good topic for starting 6.x --=20 Alexey Zakhlestin CTO at Grids.by/you https://github.com/indeyets PGP key: http://indeyets.ru/alexey.zakhlestin.pgp.asc --Apple-Mail=_6932F8AC-430B-4B6F-9DA2-EC4481F480BA 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 iQEcBAEBCgAGBQJSakD3AAoJEMkJcRxZdR27nkgH/j8xJ/Dp2ILtoaQEMZM3gezZ 7hSGFtBNuz3EbtV+lfvAp9xF+QrXugHOzIJjKBqy88kLfmVbJsi/FJlOlI6x4gGp vBVeeCQwde/mQY6kWurRrpdSh/vcNwiN/R3b/V8/TKa3uxhuVa9qnqDfIGs4OL+U 1C1RIEdoFg/I4vMWHeNcTlwGZPG1pInbkqhUxzjAeOG0o1LB6K5V0uMe+Gw5hn2p G7VHovObHxwhmDs8KjSjIgDUaZQWfzCp3iTas8ALjW4ewhbo0EmPvMQhtINpsn1I cba6B+TZPSXmlkN1ZmE0KXb3fYUs/CkX80Y/rXGt/Rmxh4hd31h06Sag17nABYo= =XSL4 -----END PGP SIGNATURE----- --Apple-Mail=_6932F8AC-430B-4B6F-9DA2-EC4481F480BA--