Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_default_classes.c zend_default_classes.h zend_execute.h zend_execute_API.c
| From: | Sterling Hughes | Date: | Fri, 13 Feb 2004 17:50:33 +0000 |
| Subject: | Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_default_classes.c zend_default_classes.h zend_execute.h zend_execute_API.c | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-7814@lists.php.net to get a copy of this message | ||
>
> On Feb 13, 2004, at 11:35 AM, Adam Maccabee Trachtenberg wrote:
> >Andi's point, I believe, is that otherwise we'll need to add a
> >"finally" keyword to make sure some random extension doesn't throw
> >some random undocumented exception that you could miss. And I agree
> >with him. It just seems to make everything more clean.
>
>
> And my point is that I may want to create an exception (sterling's
> 'InternalException', for example), that I do not want you catching
> unless you specifically check for it.
>
> Moving this discussion to internals@.
>
Right. Exception heirarchies are nice and all, but sometimes you want
exceptions to leak through, or be explicitly caught. In-fact, I've
never encountered a case where this isn't what I want, maybe in a small
20 line example, but in large scripts I've almost always designed for
leakage.
I contend that what you want in this case is a Throwable interface or
none at all. Java provides just this differentiation btw.
-Sterling
--
"Reductionists like to take things apart. The rest of us are
just trying to get it together."
- Larry Wall, Programming Perl, 3rd Edition