Re: Standardized way of interpolating variables into PEAR_Exceptionmessages?

From: Date: Mon, 25 Sep 2006 06:49:21 +0000
Subject: Re: Standardized way of interpolating variables into PEAR_Exceptionmessages?
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-44046@lists.php.net to get a copy of this message
Greg Beaver wrote: >Alexey Borzov wrote: >> Trivial conversion can be done via >> throw new Foo_Exception($error->getMessage()); >> or the equivalent for PEAR_ErrorStack. As for automatic conversion > >Hi, > >As a side note, even this is unnecessary, as of PEAR 1.5.0, >PEAR_Exception will be able to directly accept either a PEAR_Error >object or errorstack array (errorstack array was possible from its >introduction in PEAR 1.4.whatever-it-was) and use that to mine the >message and the error code. > >In other words, this is not an issue whatsoever, the API of >PEAR_Exception has solved both of these problems without need for >political intervention. Greg, all your explanations are good, clear and in line with the RFC that was voted about Exceptions. I suggest that you make them available somewhere in the documentation since, if we refer to Dan's original post, it seems some guy on IRC spreads FUD about PEAR_Exception and error handling in PEAR, thus creating confusion among developers who have, as you said, better things to do than clean the mess this guy is trying to make. -- Bertrand Mansion Mamasam Tel : +33 1 48 89 88 26 http://www.mamasam.com Creative Internet Solutions

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