Re: PHP5: PEAR base Exception classes
| From: | Hans Lellelid | Date: | Mon, 21 Jun 2004 15:47:46 +0000 |
| Subject: | Re: PHP5: PEAR base Exception classes | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-31034@lists.php.net to get a copy of this message | ||
Chuck Hagenbuch wrote:
Quoting Tobias Schlitt <tobias@schlitt.info>:The main benefit is, that people can simple catch all PEAR_Exceptions, if
Yeah, I don't think it is any different. I would say that the main benefit of the PEAR_Exception class is that it provides support for observers which can handle logging (or even immediate death). It also provides support for nesting exceptions, which is useful. I think the value of PEAR_Exception is in these features & not in the "namespace" that it provides. I'm curious to know what your take on Exception-based error handling is, Chuck. From the parts of Horde I've seen, it seems like you're in a perfect position to comment on PEAR's use of Exception in the long run, given the extent to which Horde makes use of PEAR libraries in a many-layered framework. My impression was that it would be a big benefit to the Horde framework. Hansthey like to. I know, that this is not the goal of exceptions, but there may be places to do things like that.How is this different from just catching all Exceptions? (catch Exception e)