Re: Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]

From: Date: Sun, 06 Apr 2003 12:33:13 +0000
Subject: Re: Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-738@lists.php.net to get a copy of this message
At 03:22 03/04/2003, Stig S. Bakken wrote:
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

« previous php.internals (#738) next »