Re: PEAR's Error Handling and PHP5

From: Date: Wed, 07 Jun 2006 16:45:46 +0000
Subject: Re: PEAR's Error Handling and PHP5
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-42831@lists.php.net to get a copy of this message
On 6/7/06, Pierre <pierre.php@gmail.com> wrote:
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.
Using PEAR_Error is a design choice, too, and PEAR enforced that until PHP5 came along. Can someone on-list provide some reasons *for* sticking with PEAR_Error? or some information on where exceptions *wouldn't* fit with PEAR? Reasons other than "this forces design decisions" or "exceptions are evil"? I'd like to see some real, issues-oriented debate. There are plenty of good arguments now why exceptions might be the right direction; let's see if there are some good arguments for PEAR_Error in a PHP5 world. -- Matthew Weier O'Phinney mweierophinney@gmail.com http://weierophinney.net/matthew/

« previous php.pear.dev (#42831) next »