Re: Catchable - marking methods just like static?
| From: | Rasmus Lerdorf | Date: | Wed, 04 Apr 2012 14:33:16 +0000 |
| Subject: | Re: Catchable - marking methods just like static? | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-59352@lists.php.net to get a copy of this message | ||
On 04/04/2012 02:42 AM, Alan Knowles wrote:
> Rather than this hap-hazard approach to ensuring code is correctly
> handling error conditions would it not be far better for the engine to
> be advising of situations where this may be occurring before they
> occur.. in the same way undefined variables issue warnings. writing
> code that throws exceptions should throw warnings if it's likely that it
> is not handled.
Well, I don't disagree with you. This is why we don't throw exceptions
from the core of PHP. But I don't see how the engine can warn you about
this case in any sort of compatible way that isn't likely to drive
people crazy with warnings on perfectly valid code.
-Rasmus