error handling

From: Date: Sun, 09 Sep 2007 02:15:18 +0000
Subject: error handling
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-47951@lists.php.net to get a copy of this message
Hi Folks, I'm trying to finish up a new package, and am having some difficulty with proper error handling. I see that PEAR_Error is deprecated in favor of PEAR_Exception. But exceptions seem to be overkill for some of the things I used to use PEAR_Error for, such as passing around error codes and messages as return values from methods. For example, in this context, my class talks to a tcp daemon that may return an error code and string for a command, but it's not something I'd want to throw an exception for in my class. Rather, it would be handy to pass back an error object like PEAR_Error. But will using it in this manner keep the package from being compliant with PEAR error handling guidelines, and perhaps not accepted? Is there another way to handle this that I'm not considering? Thanks, Bill Shupp

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