Hi,

 

I've voted against on this RFC, and the only reason is the choice of a
generic \Exception.

 

The original Base Convert Improvements RFC (
<https://wiki.php.net/rfc/base_convert_improvements>
https://wiki.php.net/rfc/base_convert_improvements)  already set out the
intended path:

 

> This vote will be to raise a E_DEPRECATED warning for PHP 7.4. Raising to
be an `InvalidArgumentException` in PHP 8

 

I agree with moving away from `ValueError` for the reasons given in the RFC.
However, `InvalidArgumentException`, which was the exception originally
agreed upon, wasn't brought up.

 

The Rejected Features section notes that SPL exceptions shouldn't be thrown
from ext/standard. If that's the blocker, I'd rather see it resolved (or a
dedicated exception class introduced) than have a core function throw a bare
\Exception, which users can only catch together with every other exception.

 

Regards,
CHU Zhaowei

Reply via email to