Re: My Experience with PHP5 Error Handling (and possible
| From: | Sergio Carvalho | Date: | Thu, 26 Aug 2004 14:08:36 +0000 |
| Subject: | Re: My Experience with PHP5 Error Handling (and possible | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-32958@lists.php.net to get a copy of this message | ||
Greg Beaver wrote:
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
I've also stated that Exceptions, although useful, do not solve absolutely every error-handling problem, and have posted these concerns in the wiki page. Somehow, none of them made it into the RFC. 1) handling multiple error conditions at once is very difficult with exceptions, and will need to be standardizedThis has been discussed, yes. However, all examples of multiple error conditions presented were stuff like precondition checks (validations, depency checking, etc). These can be reported in one single exception. Nothing forces you to throw an Exception when you find one dependency failure. You can gather all information, and throw a complete exception. In conclusion, this was deemed a design issue, not an exception pitfall, and removed from the document. For anyone interested, all of this discussion is in the wiki changelog.
2) upgrading warnings to exceptions and downgrading exceptions to warnings is not difficult, but will be if it is not standardized.This standardization was postponed to the warning handling RFC, since the warning class will be the one providing these in its API. Cheers, Sérgio Carvalho
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc