Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107660 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19584 invoked from network); 24 Oct 2019 18:45:32 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 24 Oct 2019 18:45:32 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id DEB3D2D0769 for ; Thu, 24 Oct 2019 09:31:57 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Virus: No Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Thu, 24 Oct 2019 09:31:57 -0700 (PDT) Received: by mail-io1-xd31.google.com with SMTP id p6so22038160iod.7 for ; Thu, 24 Oct 2019 09:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=xUF53RsaEovU1GNKHPWSZjRVLdlQtBZxy75dmLdZt80=; b=YpoZqqzhm09PevKFRgBlEDyaeFVyDZetNbpPXAQO5zQtM7vw71nYR2GWHJMPdlpGIl rd4LRbmfzYNtSnPyqVAL3gbndItfyRFAFf4e6OYSgB1M8GI8rLgCFJXzvsAHUvSxinnS My2h8V2AQcQo8/YXFvTrzbbHinqmXgInfVDfQxZ7DgPmEx+vhgO1wbvDCvZL0/mSYwZG jeiLI7G0DmAn+00PUZ+GgJhh6yYGD5dyD7O8LoCNsH3CZ14pQyI5T8BSnXCxZLY/Kh3e 7q70NYN8lW7tgWBZw+FWSZJunvih0hCtVRu/7j+/yBVU7NRMEVwf4Xsf9bzjFimu2T6x nezQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=xUF53RsaEovU1GNKHPWSZjRVLdlQtBZxy75dmLdZt80=; b=fifXCR2JDy6m0LXcQnE90y2eYwCQZsJjmG8NAfytIEGRttaC4p9x+yvBn20yxITVfr fDnOQ9I8N1pjuH/Jw2wWWnCrO4Xd9hzo+EnGFjeoX+XqpOmLA8rNPIiifl5gdaNbYPzT M/AGpS53JnEZglSepRzkBZXdOeBdcOuPV6hWhrC1onY0Hw7wqGDJv4MvqmrtnoD5M1K8 lax0gEzzb5gceiCzgx9jJ54EPtgbF6DixLRnC9BAwRYns+ckSawNlCybStcjEXPUj6Us sc1jyDfGliDjzo0P7KRMBa+QtLXbXERsM5dX9+sUlRP73gNFJpxWoFq56icOEoIBUJnU grhw== X-Gm-Message-State: APjAAAXRn6C/vNNHbboYzbq6R4FGl0nFUIrdtj40ZTCfLP3cCsT/xcCF 9QwJCTX8Fkg6ZG9G0bsLI2pXjph6axxtJC4nRwPJlQ== X-Google-Smtp-Source: APXvYqwmf8AlvKnZ4MIBYpHaqMg5qdnLsF84iD8Tg3mKbZYJm9+wypf+Wv2qoAXUqy6Pm4zrKEiqqjqnRIr/+N781cA= X-Received: by 2002:a05:6638:157:: with SMTP id y23mr15694750jao.66.1571934716478; Thu, 24 Oct 2019 09:31:56 -0700 (PDT) MIME-Version: 1.0 References: <5f8115ce-0f89-c401-c8b8-9f865e76edd3@xs4all.nl> <11C11DE1-9D3B-4CB1-8226-AD48A0CE7A33@newclarity.net> In-Reply-To: <11C11DE1-9D3B-4CB1-8226-AD48A0CE7A33@newclarity.net> Date: Thu, 24 Oct 2019 17:31:45 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="00000000000062c9a10595aa9297" X-Envelope-From: Subject: Re: [PHP-DEV] Reclassifying some PHP functions warning as exceptions From: rowan.collins@gmail.com (Rowan Tommins) --00000000000062c9a10595aa9297 Content-Type: text/plain; charset="UTF-8" On Thu, 24 Oct 2019 at 16:38, Mike Schinkel wrote: > > Here, try() would swallow only FileException, other exceptions are still > > thrown. I'm not sure if this construct is worth introducing though, the > > difference compared to a proper try / catch is much smaller. > > I would want it to capture every exception. Why not? Because you might want to convert "FileLockedByAnotherProcessException" to a locally-handled error, but allow "ServerIsOnFireException" to bubble up to a higher-level exception handler. That's why catch blocks basically force you to specify class/interface names: you should catch only the exceptions you actually know how to handle in that particular piece of code. Regards, -- Rowan Tommins [IMSoP] --00000000000062c9a10595aa9297--