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 13:12:59 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_default_classes.c zend_default_classes.h zend_execute.h zend_execute_API.c | ||
| References: | 1 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-2373@lists.php.net to get a copy of this message | ||
> zeev Thu Feb 12 05:24:40 2004 EDT
>
> Modified files:
> /ZendEngine2 zend_default_classes.c zend_default_classes.h
> zend_execute.h zend_execute_API.c
> Log:
> Exceptions updates:
>
> - Enforce exceptions to be derived from class Exception. This allows
> users to perform catch-all. It's not yet complete, so don't get
> comfortable with it just yet :) Updates are coming soon.
This is imho wrong. Exception is not a requirement, but an optional
thing. For the most part, all user exceptions should inherit from
"Exception," but that same onus is not on extension space exceptions, or
exceptions that are meant to be thrown out of bounds.
Ie, you should be able to have:
try {
foo();
} catch (Exception $e) {
} catch (InternalException $ie) {
}
What is the reasoning for this new change?
-Sterling