# [VOTE] JSON_THROW_ON_ERROR

- Thread: https://externals.io/message/100772
- Original archive: https://news-web.php.net/php.internals/100772
- Started by Andrea Faulds on 2017-09-25T21:22:03+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #100772 — Andrea Faulds — 2017-09-25T21:22:03+00:00

URL: https://externals.io/message/100772#100772

Hi everyone,

https://wiki.php.net/rfc/json_throw_on_error

Voting opens today, 2017-09-25, and ends in 10 days' time, 2017-10-05. 
Under the terms of the voting RFC this only needs 50%+1 but I'll feel 
guilty if it's not 2/3 so it's 2/3.

Happy voting, please ask if there's anything needing clarifying.

Thanks.
-- 
Andrea Faulds
https://ajf.me/

---

## #100775 — Derick Rethans — 2017-09-26T10:01:58+00:00

URL: https://externals.io/message/100772#100775 · In reply to: #100772

> Hi everyone,
> 
> https://wiki.php.net/rfc/json_throw_on_error
> 
> Voting opens today, 2017-09-25, and ends in 10 days' time, 2017-10-05. Under
> the terms of the voting RFC this only needs 50%+1 but I'll feel guilty if it's
> not 2/3 so it's 2/3.
> 
> Happy voting, please ask if there's anything needing clarifying.

I'm going to be in favour, but I was wondering whether the name of the 
exception "JsonException" is a good thing? I would still introduce it, 
but probably subclass a "JsonCodingException" to signal just an 
exceptional code while encoding/decoding. I can see future exceptions 
being thrown from the extension, where you then get confusion (or 
conflicts with error codes).

cheers,
Derick

-- 
https://derickrethans.nl | https://xdebug.org | https://dram.io
Like Xdebug? Consider a donation: https://xdebug.org/donate.php
twitter: @derickr and @xdebug

---

## #100776 — Niklas Keller — 2017-09-26T11:42:07+00:00

URL: https://externals.io/message/100772#100776 · In reply to: #100775

2017-09-26 12:01 GMT+02:00 Derick Rethans <derick@php.net>:

> 
>
> > […]
> Under
> > […]
> if it's
> > […]
>
> I'm going to be in favour, but I was wondering whether the name of the
> exception "JsonException" is a good thing? I would still introduce it,
> but probably subclass a "JsonCodingException" to signal just an
> exceptional code while encoding/decoding. I can see future exceptions
> being thrown from the extension, where you then get confusion (or
> conflicts with error codes).


Which future exceptions can you imagine?

Regards, Niklas

---

## #100829 — Andrea Faulds — 2017-10-05T22:00:37+00:00

URL: https://externals.io/message/100772#100829 · In reply to: #100772

Hi again,

I'm happy to report `JSON_THROW_ON_ERROR` was unanimously accepted with 23 
votes.

Hopefully it can be merged soon. Now would be a good time to review the 
pull request if desired.

Thanks for discussing and voting!

-- 
Andrea Faulds
https://ajf.me/
