|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #47097 DomainException documentation problem: insufficient description
Submitted: 2009-01-14 12:55 UTC Modified: 2009-11-20 10:54 UTC
From: me at signpostmarv dot name Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2009-01-14 12:55 UTC] me at signpostmarv dot name
"A domain exception" doesn't appear to be a particularly useful description for the intended usage of the Exception class, when compared to the other descriptions:

* Exception thrown if a callback refers to an undefined function or if some arguments are missing

*  Exception thrown if a callback refers to an undefined method or if some arguments are missing


Expected result:
A sufficient explanation of the intended use of the DomainException class, more in line with the descriptions of the other Exception classes provided via the SPL.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-14 14:29 UTC]
Your are totally right. And there is a good reason for that: We have no idea what its useful for :)

Marcus: Could you enlighten us? :)
 [2009-01-14 15:10 UTC] me at signpostmarv dot name
I've no idea :-P

Perhaps ask whoever added DomainException to SPL in the first place ?
 [2009-01-14 15:11 UTC] me at signpostmarv dot name
I suppose the problem is that there are a few too many definitions of "Domain" :-s
 [2009-01-14 16:40 UTC] me at signpostmarv dot name
Google Code to the rescue! sort of :-S

Google Translate doesn't help all that much, but if you can find a native speaker/reader they might be able to grok the intention of a Domain Exception, then try and corroborate the meaning with other sources.

~ SVN Humor FTW :-P
 [2009-01-14 17:40 UTC]
(reclassify as documentation problem)
 [2009-03-02 21:07 UTC]
Domain means data domain here. That is a DomainException shall be through whenever a value does not adhere to a defined valid data domain. Examples:
- 0 is not a in the domain for division.
- Foo is not in the domain for weekdays.

The first is different from out of range and alike, but you could use InvalidParameter in case it is actually a parameter to the function that performs the division. If it is a value calculated inside the function prior to executing the division and then a pre-conditon check throws instead of executing the division, then it becomes a DomainException.

The second could be seen as an OutOfRangeException.
 [2009-11-20 10:54 UTC]
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

 [2009-11-20 10:54 UTC]
Automatic comment from SVN on behalf of vrana
Log: Describe domain exception (bug #47097)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Feb 27 13:01:27 2024 UTC