Re: Call for Review: RFC for Error Handling in PHP5 packages
| From: | Lukas Smith | Date: | Sat, 07 Aug 2004 06:39:37 +0000 |
| Subject: | Re: Call for Review: RFC for Error Handling in PHP5 packages | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-32504@lists.php.net to get a copy of this message | ||
Davey wrote:
Davey wrote:
I would urge that you consider this point - we MUST unify how errors are recieved by the USER, otherwise we're going to have tangles of error handling on the users end.
On an additional note, it would be possible for the user to specify a callback for PEAR_ErrorStack which would re-throw the exceptions, this could be the way to placate everybody - those who use exceptions only can have PEAR_ErrorStack re-throw them and ignore the stack whilst those who don't use the stack. Greg - is it possible to have this as like... a special callback? like: PEAR_ErrorStack::throwExceptions(); would add an additional callback for all errors to go through (so even if you repackage the error and stuff, it will then throw the exception with the repackaged error)Uhm I still dont quite see how your proposal works. Could you try to explain with a bit of pseudo code? Also could you try to note the possibl edisadvantages of such a system. regards, Lukas