Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107608 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 78808 invoked from network); 21 Oct 2019 19:34:03 -0000 Received: from unknown (HELO localhost.localdomain) (76.75.200.58) by pb1.pair.com with SMTP; 21 Oct 2019 19:34:03 -0000 To: internals@lists.php.net References: Date: Mon, 21 Oct 2019 18:19:43 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Posted-By: 94.8.59.3 Subject: Re: [PHP-DEV] Reclassifying some PHP functions warning as exceptions From: marandall@php.net (Mark Randall) Message-ID: On 21/10/2019 17:02, Rowan Tommins wrote: > - They immediately jump control out of the current frame of execution. > Unless you put a separate "try-catch" around every line, there is no > "acknowledge and run next line". I've been toying with the idea of: $x = tryval fopen('missing.txt', 'r'), FileException => null; if ($x === null) { die('File could not be opened.'); } -- Mark Randall