On Fri, 2003-03-28 at 15:03, Andi Gutmans wrote:
>
> Exceptions have a potential of leaking memory. I have mentioned in the past
> that I wouldn't base my applications logic on exceptions but only use it in
> error conditions to clean-up and/or give a nice message. You are talking
> about using it as part of your application logic.
If I can't use exceptions for application logic, why should I bother with using exceptions at all when there is trigger_error() and die()?
If you use exceptions for application logic, then you're writing bad code, regardless of the language! It's one of the cases of clear over-design. Exception handling provides an OO way of handling errors, that is more fine-grained than set_error_handler() and trigger_error(). Nothing more, nothing less.
Zeev
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php