php.net |  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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: me at signpostmarv dot name
New email:
PHP Version: OS:

 

 [2009-01-14 12:55 UTC] me at signpostmarv dot name
Description:
------------
"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:

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

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


etc...

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.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-14 14:29 UTC] bjori@php.net
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

http://code.google.com/p/biblioteca-de-alejandria/source/browse/trunk/workspace/Alejandria/src/ar/alejandria/exceptions/DomainException.java?r=23


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] bjori@php.net
(reclassify as documentation problem)
 [2009-03-02 21:07 UTC] helly@php.net
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] vrana@php.net
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] svn@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&revision=291059
Log: Describe domain exception (bug #47097)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 19:01:31 2024 UTC