Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100495 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91402 invoked from network); 10 Sep 2017 07:42:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Sep 2017 07:42:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=brad@legalweb.org.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=brad@legalweb.org.uk; sender-id=pass Received-SPF: pass (pb1.pair.com: domain legalweb.org.uk designates 188.39.106.5 as permitted sender) X-PHP-List-Original-Sender: brad@legalweb.org.uk X-Host-Fingerprint: 188.39.106.5 mail.legalweb.org.uk Received: from [188.39.106.5] ([188.39.106.5:37806] helo=mail.legalweb.org.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 63/6B-10715-9FCE4B95 for ; Sun, 10 Sep 2017 03:42:50 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.legalweb.org.uk (Postfix) with ESMTP id 5D41B1AB2 for ; Sun, 10 Sep 2017 08:42:47 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=legalweb.org.uk; h=content-language:content-transfer-encoding:content-type :content-type:in-reply-to:mime-version:user-agent:date:date :message-id:from:from:references:subject:subject; s=default; t= 1505029364; x=1506843765; bh=7bj838dwyWEX4YWr5yhY7KRKDSaYZ0crLkQ 1minetQc=; b=KwQQ/GuCEOpuX8FygOn79I3iPmFep+OQ2SswfVG1M/e8nwTPyx0 LDgmVyq8t2tdh5zCTBQ38H9+ck5WZwpNwKvEdijhBB6awCwr2D/Jb3s7fTpgh7+w iu3bRh/k+uGtR5b9/oqLqDsMptcIJ8fcWh1U059LcmW+CF1XWJZfgmMKVS6zAyVu ffpLIuaY7FlErqSbMae1VBsaPytDNQTzNQE3wWBGXkM44M2OTqHHRISSvgSWoLL1 BeT4Gs41tYQhD/bUHMu3dzeO1dyWmeSCzHeEkW9w70JveNlR54XVKRDKGXCmnIm/ yjnIMVpIpEh0ffRnFjZxMemw71aSmSGlKypDswh0m9T3osj7oQd3POYw7/Az5T8g 4RwZhef41GZqpNWZyQRhABr4nQP7n0JQFX4SZEfEBtjDSXZnVmi6cggHqvKnnmaf s0QrIpE+WQjWrGVG7eVwfpYv7NbcbrPKk+uFDD4ypVeY3J7rSuI/aIE8q+rE7Dto Mq+kFTBayWdT+qK0vEVtacrx0AAGOqU3StG1d6GNP4TuZtLeF01V52ipYeFoA3ju PVuaX10bxDiGgy1IErxq65J86Zf2glBZtb40LL+imWxqmgzX5Q2UmeKcrv9oVo/+ dpbprPDWeApHecm1/GeEd1Pgv7eBGNC7yUb32c46Txol5PA2fg+nxxlk= X-Virus-Scanned: Debian amavisd-new at mail.legalweb.org.uk Received: from mail.legalweb.org.uk ([127.0.0.1]) by localhost (fidanza.ad.legalweb.org.uk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 7wQwYFe1mycA for ; Sun, 10 Sep 2017 08:42:44 +0100 (BST) Received: from bweston-dell.webod.co.uk (cpc87517-nfds17-2-0-cust181.8-2.cable.virginm.net [82.25.176.182]) (Authenticated sender: brad@legalweb.org.uk) by mail.legalweb.org.uk (Postfix) with ESMTPSA id 3215C173F for ; Sun, 10 Sep 2017 08:42:44 +0100 (BST) To: internals@lists.php.net References: <82.9A.10715.73494B95@pb1.pair.com> Message-ID: <5d882203-b31c-f006-db93-60d23ae2c6b1@legalweb.org.uk> Date: Sun, 10 Sep 2017 08:42:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <82.9A.10715.73494B95@pb1.pair.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [PHP-DEV] [RFC] [Discussion] JSON_THROW_ON_ERROR From: brad@legalweb.org.uk (Bradley Weston) I definitely hate having to test the return value and then getting the error message via a function call. +1 for ability to throw exceptions instead. On 10/09/17 02:24, Andrea Faulds wrote: > Hi everyone, > > Craig Duncan previously sparked discussion here about JSON's > error-handling behaviour. Unfortunately, his attempt to change it > seems not to have gone anywhere, but I have his blessing to try this > other approach instead. > > So here's an RFC: https://wiki.php.net/rfc/json_throw_on_error > > The feature can be described in a single paragraph (in fact, the title > is pretty much enough, the patch is just detail) but it's better to go > through the proper RFC process. > > Please tell me what you think. > > Thanks! >