Re: type hinting throwing a fatal error

From: Date: Thu, 11 Aug 2005 08:10:14 +0000
Subject: Re: type hinting throwing a fatal error
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-17822@lists.php.net to get a copy of this message
At 11:03 11/08/2005, Derick Rethans wrote:
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.
You mean it shouldn't be able to stop the application, or that the application should be able to prevent this error from stopping it? If it's the latter, then it would be possible. If it's the former, then I don't quite understand... Zeev

Thread (125 messages)

« previous php.internals (#17822) next »