Re: Standardized way of interpolating variables into PEAR_Exceptionmessages?
| From: | Greg Beaver | Date: | Mon, 25 Sep 2006 03:01:52 +0000 |
| Subject: | Re: Standardized way of interpolating variables into PEAR_Exceptionmessages? | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-44042@lists.php.net to get a copy of this message | ||
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