Re: Re: Are exceptions allowed in php core?

From: Date: Mon, 03 Sep 2012 23:39:32 +0000
Subject: Re: Re: Are exceptions allowed in php core?
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  Groups: php.internals 
Request: Send a blank email to internals+get-62773@lists.php.net to get a copy of this message
On 09/03/2012 04:31 PM, Alex Aulbach wrote: > 2012/9/4 Gustavo Lopes <glopes@nebm.ist.utl.pt>: >>> Following this logic, we'd have to convert all E_NOTICE and E_STRICT to >>> fatal errors or exceptions - they are usually produced by programming >>> errors and aren't meant to be caught by surrounding code (actually, >>> can't). But I don't see anybody benefiting from this - as I don't see >>> anybody benefiting from generator that will explode your application if >>> you touch it twice. > > Nobody is forced to handle an notice-exception like a fatal exception. > A notice-exception can be created write something into an error-log > and tells PHP not to handle it any more (destroys itself). Could be > all done in the construction of the exception. > First, you got the quoting wrong. Please be more careful with that. And second, huh? Uncaught exceptions are by definition fatal. There is no such thing as a notice exception. If we go down that road refer to my email describing condition error systems. Longer term I think a condition system would make a lot of sense for PHP, but we definitely don't want to introduce some sort of bastard non-fatal exception. -Rasmus

« previous php.internals (#62773) next »