Re: PEAR's Error Handling and PHP5
| From: | Pierre | Date: | Wed, 07 Jun 2006 16:35:39 +0000 |
| Subject: | Re: PEAR's Error Handling and PHP5 | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-42830@lists.php.net to get a copy of this message | ||
On 6/7/06, Markus Wolff <wolff@21st.de> wrote:
Justin Patrin schrieb: Some talking points: 1) Would it be possible for us to allow both PEAR_Error and Exception usage for PHP5 packages? Would this fragment our error handling too much? (This would, of course, require a version of PEAR_Error which is E_STRICT). In places where PHP5-packages must interoperate with PHP4 ones, there won't be another solution here. No need for an E_STRICT-compatible PEAR_Error here, as in situations dealing with PHP4 packages E_STRICT will be impossible anyway. For PHP5-packages, I'm definitely pro-Exception.I'm defitivally and totally against forcing design choices. Exceptions usage is a design choice Understand you use them when you consider you have not because a rule foces you to use them everywhere as error handler or control flow. --Pierre ps: I recommend to read Pragmatic Exceptions from Benjamin Booth (Dr. Dobbs journal serie) http://www.ddj.com/TechSearch/searchResults.jhtml?queryText=pragmatic+exceptions&x=0&y=0