Re: exceptions
| From: | Greg Beaver | Date: | Tue, 08 Jun 2004 19:25:26 +0000 |
| Subject: | Re: exceptions | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-30211@lists.php.net to get a copy of this message | ||
Hans Lellelid wrote:
Hi Greg, Good message, though I didn't like the parts where you disagreed with me :)But of course :)
One clarification, though. Generally, in apps I've developed (and in all other complex apps whose source I've studied), there are relatively few top-level catch blocks where errors are actually logged. Errors thrown within the program may be caught & re-thrown (or wrapped) in many cases, but logging happens at the top. So you don't actually need to log in every catch() block, just every top-level catch() block. This difference makes explicit logging not that big a deal in actuality.This is true - and perfect support for my proposed solution: "no human or machine shall release a package written with new PHP5 features with a beta or stable stability label until at least 2 or 3 alpha releases have been released and extensive field testing has ensued." :) This will allow people to try out all of their solutions and toss them in favor of a better way later without major Backwards Compatibility issues (PEAR_ErrorStack is still alpha for this reason alone, it's quite stable for what it is designed to do). I may have done a lot of thinking about error handling, but I really don't feel like I've done all the thinking there is to do, so with evidence that I am wrong, I will happily recant any rash pronouncements I've made in the past. Except the one about no human or machine and stuff ;). Nice work with phing btw Greg