Re: Mail_IMAP 2.0.0 alpha 1

From: Date: Wed, 07 Jul 2004 00:15:27 +0000
Subject: Re: Mail_IMAP 2.0.0 alpha 1
References: 1 2 3 4 5 6  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-31687@lists.php.net to get a copy of this message
Hi Greg, Greg Beaver wrote:
Hans Lellelid wrote:
adding additional context information along the way. Sure, I suppose you can use errorstack to throw your exceptions for you, but why? Why not just throw them directly? You get a clearer stack trace and with the stuff that's being bolted on to PEAR_Exception you're not going to lose any functionality either. Also, last I checked ErrorStack didn't support nesting Exceptions, which IMO is crucial to that system of error handling.
Please look at the code prior to commenting on it, especially in such a critical manner. PEAR_ErrorStack does *not* throw exceptions, nor does it attempt to replace exceptions. It can *return* an exception, and you do whatever you want with it. This is clearly stated in the documentation, and is obvious with one single solitary look at the code. It simply provides a unified logging and collection interface for differing methods of collecting information about a program.
Sorry aboutbout that. Am not trying to spread misinformation myself. I have looked over ErrorStack in some detail, just apparently not recently enough. I think I was more responding to Justin's suggestion of using a hybrid system where you can have raiseError() (but he was talking about ErrorStack, so am confused now) throw an Exception instead of return an error. -- and also I was not being critical of ErrorStack! It's an awesome package, I'm just not sure I see the merits of adopting it as a solution for *exceptions* in PHP5-only packages. I think it'd work great for handling warnings / notices; a stack system is well suited to that task.
This is not religion folks, just look at the code. No need to speculate.
Heh :) True, true. Hans

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