Re: try..catch
| From: | Zeev Suraski | Date: | Wed, 30 Aug 2000 21:09:18 +0000 |
| Subject: | Re: try..catch | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-31325@lists.php.net to get a copy of this message | ||
At 00:01 31/08/2000, Mathieu Kooiman (ggInternet) wrote:
I discussed this with you once on #PHP (I'm CaPS) Uhm.. back then you said you didn't want anything like throw() .. Why did you change your mind on that?What I didn't want is a Java-like, object based catch statement. I don't want the catch statement to catch certain types of objects in the language level, have several catch statements for the same try, etc. Instead, I believe it's much more important to answer the need to cleanly recover from language-level errors on one hand, and give end users the ability to send information to the error recovery code in userland code. This, coupled with the ability to selectively propagate the exception in case your code fails to handle it (using very simple means with virtually no language-level support), gives you all the power you need, without tying the implementation to an object oriented niche, and while keeping it very simple. Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/