Re: [RFC] [Discussion] JSON_THROW_ON_ERROR
| From: | Bradley Weston | Date: | Sun, 10 Sep 2017 07:42:40 +0000 |
| Subject: | Re: [RFC] [Discussion] JSON_THROW_ON_ERROR | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-100495@lists.php.net to get a copy of this message | ||
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!