Re: Core functions throwing exceptions in PHP7
| From: | Scott Arciszewski | Date: | Wed, 15 Jul 2015 11:30:46 +0000 |
| Subject: | Re: Core functions throwing exceptions in PHP7 | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-87182@lists.php.net to get a copy of this message | ||
try {
random_*();
} catch (SomeException $e) {
// Something
}
... is far cleaner than telling developers to override the error
handler for one specific function.
That said, I won't oppose E_RECOVERABLE_ERROR or E_ERROR if that's
what the rest of the Internals team settles on. Just don't expect me
to be quiet when, in future versions, we transition back to an
Exception. Failing closed is my only priority here.
Scott Arciszewski
Chief Development Officer
Paragon Initiative Enterprises
On Wed, Jul 15, 2015 at 7:27 AM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
> Hi Scott,
>
> On Wed, Jul 15, 2015 at 8:20 PM, Scott Arciszewski <scott@paragonie.com>
> wrote:
>>
>> At what point do we stop blaming the developers for not knowing how to
>> use our badly designed features, and accept responsibility for
>> exposing an API that is hostile towards simple, efficient, and correct
>> implementations?
>
>
> I fully agree with this.
> Isn't E_RECOVERABLE_ERROR enough for random_*()?
>
> Regards,
>
> --
> Yasuo Ohgaki
> yohgaki@ohgaki.net