Re: Exceptions and Errors
| From: | Derick Rethans | Date: | Tue, 13 Apr 2004 07:28:38 +0000 |
| Subject: | Re: Exceptions and Errors | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9100@lists.php.net to get a copy of this message | ||
On Tue, 13 Apr 2004, Greg Beaver wrote:
> I don't think that exceptions suck, but I agree that they are limited in
> their usefulness, just as you describe in the first paragraph. The
> majority of error conditions aren't severe enough to need them.
> Unfortunately, many developers I have talked to about exceptions plans
> to use them for just about every kind of error condition, and they
> expect them to be useful as such.
Then they are abusing exceptions big time. Throwing exceptions for
E_ERROR conditions *might* be a good idea, but for anything lower than
that: no way. This also means that extensions usually should not throw
exceptions at all, as they are not supposed to throw E_ERRORs that abort
scripts right away.
Derick