Re: type hinting throwing a fatal error
| From: | Derick Rethans | Date: | Thu, 11 Aug 2005 08:03:25 +0000 |
| Subject: | Re: type hinting throwing a fatal error | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-17821@lists.php.net to get a copy of this message | ||
On Thu, 11 Aug 2005, Derick Rethans wrote:
> > I believe we mentioned once the possibility of adding another error level,
> > which is fatal - but still catchable by set_error_handler(). That is a good
> > idea (which we should be doing either way).
>
> That would work well. I just want the type hints to be catchable.
Except that it shouldn't be able to stop the application. The reason for
this is that Unit Testing on this stuff should still work, and you can't
always anticipate what your users do with your libraries. If a user
does something wrong in a third party module to your application,
and pass a wrong opbject to one of your utility classes, when we do
not want the whole application to stop immediately, as it might be
just a sub-part of you application which is very possible to ignore
for the full working of your application. This is why
I first suggested an exception, so that the application can continue.
Although in *my* opinion the application just should blow up, other
people disagree with me here.
Derick
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org