Re: some questions on PEAR_Error usage
| From: | Oyvind Moll | Date: | Tue, 24 Apr 2001 13:47:30 +0000 |
| Subject: | Re: some questions on PEAR_Error usage | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-85@lists.php.net to get a copy of this message | ||
On Tue, Apr 24, 2001 at 09:31:14AM -0400, Stig Sæther Bakken wrote:
| [Steven Haryanto <steven@haryan.to>]
| >
| > 1. Should I create my own "exception" type subclassing from
| > PEAR_Error. [...]
|
| Normally you won't need to subclass PEAR_Error. The cases I can think
| of is where you only want the concept of an error code (like in DB),
| or if you want to report a lot of extra information.
Yes, indeed. E.g. I like being able to see a kind of call stack that led
to an error, and have done some crude and ugly subclassing of PEAR_Error to
accomplish this in the past. Has anyone else experimented with this and
arrived at a clean-ish solution?
--
Øyvind Møll
oyvindmo@initio.no