Re: Code Modifications Needed for Error Handling
| From: | Hans Lellelid | Date: | Tue, 31 Aug 2004 05:16:45 +0000 |
| Subject: | Re: Code Modifications Needed for Error Handling | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-33091@lists.php.net to get a copy of this message | ||
Davey wrote:
Now, what this means is, whether you use PEAR_Error or PEAR_Exception, assuming you don't try...catch your exceptions, all errors will end up on the PEAR_ErrorStack (great if you're mixing 4&5 code). However, if you do try...catch any exception, it will not go on the ErrorStack.I think at this point this discussion is moot. That said, the problem that jumps out immediately when I read your suggestion is this: How do you deal with PHP5 packages that use other PHP5 packages and hence use try / catch blocks ... ? Remember that PEAR packages don't only raise errors; they also check errors raised by other packages. Certainly if I were writing a PHP5 package that depended on others, I'd want to be able to take advantage of try / catch to handle exceptions. Again, though, the RFC for Exceptions in PHP5 packages finished. Thankfully we can now move on to addressing warnings and other related issues. -Hans