The catch-all helps catching any type of exception, _given that_ it is derived from class Exception. The motivation behind it, and this makes sense to me, I'm pro this behaviour, is, that this way the interface of the Exception class is well defined. You can always count that you have the methods getMessage, getCode, getFile, getTraceAsString, etc. Which is IMO good.
- Markus
With this behavior you force the developer to use the exception class. You cannot use your own class because PHP will trigger an error if you do.
However, you can of course extend the exception class with your own class, but you cannot replace the default methods (getMessage etc) since they are final.
I don't like this, since you are forced to use the built in exception class which also has final methods. Where has the feeling of freedom gone?
/Erik
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php