Re: Re: PEAR_Exception in CVS
| From: | Hans_L | Date: | Fri, 02 Jul 2004 12:50:21 +0000 |
| Subject: | Re: Re: PEAR_Exception in CVS | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-31490@lists.php.net to get a copy of this message | ||
Bertrand Mansion wrote:
Yup, definite +1 -- use ErrorStack or some other convention for warnings. Using PEAR_Exception for warning stack handling is just confusing -- because stacks & thrown exceptions don't mix. Of course you could use a PEAR_Warning object derived from EPAR_Exception or just Exception ... but I think an ErrorStack like construct would be far more intuitive to users. And I don't think there's any advantage to trying to stick all of that functionality in PEAR_Exception. Personally, I think having one or two interfaces and maybe using a ErrorStack-like manager class (for ability to add observers, etc.) would completely solve this problem in an extremely flexible way -- and will not bloat PEAR_Exception. HansPEAR_Exception::addObserver('warning',PEAR_OBSERVER_TRIGGER);I don't think warnings belong to PEAR_Exception at all.