Re: Exceptions - A new slant to the argument
| From: | Davey | Date: | Thu, 08 Jul 2004 17:41:08 +0000 |
| Subject: | Re: Exceptions - A new slant to the argument | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-31760@lists.php.net to get a copy of this message | ||
Hans_L wrote:
Hi Davey,Lukas emmited an example of using exceptions if an option in an array is missing, lets take a look at this for a second.
A developer MAY choose to throw an exception at this point - but this exception should NOT reach the user in this form. The exception should be caught by the developer internally in the package.
A quick response. Take a look at the wiki page under the section "Exceptions are Catch-Oriented". The idea with exceptions is that low-level packages don't know the severity. It's up to the calling code to make those types of decisions. I think this "consistency with flexibility" makes a very good model for n-package collaboration.Please take the time to read the entire mail, a full response would be appreciated - I will not respond to this till you've done so. - Davey