Re: Exception misinformation

From: Date: Wed, 07 Jul 2004 01:41:14 +0000
Subject: Re: Exception misinformation
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-31691@lists.php.net to get a copy of this message
David Costa wrote:
On Jul 6, 2004, at 9:37 PM, Hans_L wrote: Eventually the "users won't know how to catch exceptions" argument it totally flawed. If they don't, they probably never used PHP 5 (or never used it extensively) therefore they will have little if no interest in PHP 5 only packages.
I got to disagree on that point. A PHP5 package could on itself be interesting without the user specially interested in, or knowning the ins and outs of PHP5. The interest is in what the package does for the user, not that's it's a PHP5 package. To remedy that, I think good and simple examples of how to handle the exceptions thrown by the package are even much more important. With PEAR_Error it's easy, you just check the return value, as one would normally do (even though, it's amazing how many people still don't check anything.) That's simple enough to not scare too many people. With exceptions, it requires educating oneself (not such a bad thing ;-), but it could create a barrier for some. The barrier could easily be lifted by examples, even if it's just to use that one package. I can easily imagine when PHP5 will have a noticeable installed base, most users will continue to use it as PHP4. So the only way to go is educating users with easy example on how to use packages that throw errors... -Philippe

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