Re: exceptions

From: Date: Wed, 09 Jun 2004 17:02:33 +0000
Subject: Re: exceptions
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30302@lists.php.net to get a copy of this message
On Wed Jun 09, 2004 at 10:3214AM +0200, Bertrand Mansion wrote: > - If you use PEAR_Error, you add an external dependency to your package whereas > exceptions are bundled in PHP5. I have had some requests for a PEAR free > HTML_QuickForm, so exceptions are interesting in this case. Valid point. But do you believe that we will run into such situations very often? > - Returning a PEAR_Error object is IMO heavier than throwing an exception > because of all the overhead it adds. PEAR_ErrorStack might become handy here, because it seems to come with a much smaller memory footprint than PEAR_Error. Greg should know the details here. > I would be interested to know how many people know about exceptions and use > them in their code already and what for. I believe quite a number knows them or at least knows the basics about them, but I fear that most of these people don't really know when it is appropriate to throw an exception and when not. (This does *not* imply that they aren't good programmers, though.) -- - Martin Martin Jansen http://martinjansen.com/

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