Re: Re: RFC::Error Handling Guidelines for PHP5 packages
| From: | Lukas Smith | Date: | Tue, 24 Aug 2004 15:40:29 +0000 |
| Subject: | Re: Re: RFC::Error Handling Guidelines for PHP5 packages | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-32892@lists.php.net to get a copy of this message | ||
Hans L wrote:
Davey wrote:the crux of the matter might lie in the fact that alot of people see that several errors handled via PEAR_Error today should not be exceptions. Now the question is now if those are supposed to be warnings in the future or .. a prime example to me would be an error inside a query. there might be syntactical errors, contraint violations, missing entities etc. right now all of these are PEAR_Error's however I would say that atleast all but the syntax errors should not become Exceptions. regards, LukasSergio, Et al; I had a *very* long discussion with both Stig and Alan on IRC last night, Alan has voted +1 on the RFC whilst Stig is seeming to be playing the devils advocate right now. Now, because of the conversation we had, I want to bring up some more points: 1) PEAR_ErrorStack may not be *the* solution, its *a* solution and will work to provide errors to all users in a uniform fashionYes, but as Sergio mentions, you lose key features of Exceptions by adopting this solution. Sure it is *a* solution, but so is trigger_error(). Throwing & stacking are simply very different; I think that Sergio & others have illustrated that exception don't belong in stacks, because by definition they mean that program execution should not continue.