Re: Exception misinformation
| From: | Tony Bibbs | Date: | Tue, 06 Jul 2004 20:32:48 +0000 |
| Subject: | Re: Exception misinformation | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-31665@lists.php.net to get a copy of this message | ||
Hans_L wrote:
I think that there are definitely reasons to be cautious of using exceptions, and I think it would be good to discuss those. E.g. use of exceptions as flow control, how packages should re-throw or wrap exceptions from other packages, guidelines for when it is appropriate to throw exceptions, how packages should subclass extensions, how they should be documented. Hans,I couldn't agree with you more, especially for the need for clarification on the items you listed above. As a relative outsider, I was extremely confused when trying to figure out what model to use for error handling in Auth_Enterprise given it's a PHP5-targeted package. Stephan Schmidt pointed me to a few threads on the various PEAR lists that discussed this stuff and none of it is definitive. Making a decision now would be premature, but delaying one for too long will cause just as much turmoil. My recommendation would be to get the right people (whoever they are) to sit down, addressed your issues above and release a decision. By doing so we eliminate confusion for those planing to port their PHP4 packages to PHP5 and for those, like me, who are starting with a PHP5-only package. Keep in mind that any decision is bound to frustrate a few people but I think you guys have shown in the past a knack for making the right decision for benefit of the group. --Tony