Re: [RFC] Exceptions in the engine

From: Date: Sat, 26 Oct 2013 15:04:21 +0000
Subject: Re: [RFC] Exceptions in the engine
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-69879@lists.php.net to get a copy of this message
On 26/10/2013 15:26, Joe Watkins wrote:
They _should_ exist as a boundary, a last resort, if at all, but when they do exist they are no such boundary or last resort, they are normal catch blocks because the core throws the base Exception ... I'm just making the observation that it's not a very good idea to do that, doesn't take a lot to fix, has no bc issues and sets the right kind of standard.
Right, I'm agreed that throw statements should be as specific as possible, both in core/extensions and in userland. But you seemed to link that somehow to catch(Exception) blocks, which are an entirely different topic, and have valid use cases, since they mean "catch everything descended from this class" not "catch things with this exact class". Regards the engine throwing exceptions, it's the catch side of things which is most relevant. -- Rowan Collins [IMSoP]

« previous php.internals (#69879) next »