Bug #67740 [NEW]: SPL Exception names
| From: | yosmanyga at gmail dot com | Date: | Fri, 01 Aug 2014 23:28:21 +0000 |
| Subject: | Bug #67740 [NEW]: SPL Exception names | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-186931@lists.php.net to get a copy of this message | ||
From: yosmanyga at gmail dot com
Operating system:
PHP version: Irrelevant
Package: SPL related
Bug Type: Bug
Bug description:SPL Exception names
Description:
------------
Most of the SPL exceptions describe themselves in the name (see
http://php.net/manual/en/spl.exceptions.php):
BadFunctionCallException => Bad function call
BadMethodCallException => Bad method call
OutOfRangeException => Out of range
But what about DomainException or LengthException. It doesn't express
what's the problem. IMHO it should be called BadDomainAdhereException
and InvalidLengthException respectively.
I also see a problem with InvalidArgumentException. An argument with a
problem related to an out of range or invalid length is also an invalid
argument. So why InvalidArgumentException, LengthException and
OutOfRangeException are sibling?
RangeException doesn't describe the problem neither.
Regards,
Yosmany
--
Edit bug report at https://bugs.php.net/bug.php?id=67740&edit=1
--