Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70528 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45228 invoked from network); 8 Dec 2013 11:48:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Dec 2013 11:48:46 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.48 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.219.48 mail-oa0-f48.google.com Received: from [209.85.219.48] ([209.85.219.48:64286] helo=mail-oa0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 02/C5-01020-D9C54A25 for ; Sun, 08 Dec 2013 06:48:45 -0500 Received: by mail-oa0-f48.google.com with SMTP id l6so2682491oag.21 for ; Sun, 08 Dec 2013 03:48:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=qwL027dPmxLOgGZXgTNpUNgwxa95NBfdqSSZguU6+Ds=; b=rZHwCjGRZcdcGExeGvZRDAvEmyVI4ckNetfVixZ87+2vpj+ZzF4F0UnyzO6XXB8qxj af2umVy83S52g3GipJxVaI18Lhu0sU/Dd/mB7HkB65o7wywvDg9iy212m4ADt69SO1uO 2wOBJuDY37GGHuCWz+l1DwTFNdNzBHApHL3xBDsVJd+Dvsv02CG98RQe74BU9SXB3roX yzNkRga+bysVo2x60bCO+dBlyZxaKzc1AyNTUYkYiGjPfijZHB1GQ7Q949WlZg/sSUJa W5TcDbKC//0Jg1jviJWtAdEWt20x4bx2Dd108ntwl6092guuu2kdXwzxh+bcTeCxurzk 2yZg== MIME-Version: 1.0 X-Received: by 10.182.28.35 with SMTP id y3mr3305137obg.55.1386503322434; Sun, 08 Dec 2013 03:48:42 -0800 (PST) Received: by 10.182.54.112 with HTTP; Sun, 8 Dec 2013 03:48:42 -0800 (PST) In-Reply-To: References: Date: Sun, 8 Dec 2013 12:48:42 +0100 Message-ID: To: Ferenc Kovacs Cc: PHP internals Content-Type: multipart/alternative; boundary=089e015388f60381a104ed04760a Subject: Re: [PHP-DEV] [VOTE] Allowing use of exceptions in the engine From: nikita.ppv@gmail.com (Nikita Popov) --089e015388f60381a104ed04760a Content-Type: text/plain; charset=ISO-8859-1 On Sat, Dec 7, 2013 at 6:05 PM, Ferenc Kovacs wrote: > personally I have seen catch-all blocks in the wild (try {//do something} > catch(Exception $e) {//do nothing}), which would behave differently (and > some of them would screw something up instead of terminating the app) if > the EngineException is a subclass of Exception. > I can see myself supporting this proposal for 5.6, if we can have it done > in a truly BC-safe manner, but I can understand, if the required > compromises for that would make the feature too "clunky", so maybe it would > be better to introduce it in a major version. > I'm not sure I see how catch-all blocks relate to BC-safety as far as E_ERROR is concerned. If an engine exception is accidentally caught by a catch-all block, it means that previously it was throwing a fatal error, which means that your code didn't work anyway - in all likeliness you were getting a WSOD or ISE. The catch-all block will not break the code (it is already broken), it will only change the way in which it fails (or prevent it from failing altogether). Of course, unintentionally missing an error *is* an issue, but it's not an issue of BC. Nikita --089e015388f60381a104ed04760a--