Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2

From: Date: Mon, 16 Feb 2004 17:47:08 +0000
Subject: Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-7884@lists.php.net to get a copy of this message
Hi - Ard Biesheuvel wrote:
Hans Lellelid wrote:
Personally as PHP developer (as opposed to internals developer) I am not in favor of having an interface, because I want to know that try { // ... } catch (Exception $e) { // ... } will catch *all* exceptions thrown by any libraries I choose to use, etc. Mixing the interface means requiring PHP developers to catch() on
Actually, you would use 'catch (IException $e)' which would catch the IException-derived Exception and all other classes that implement it.
Right ... what I'm saying is that I don't think people are expecting to have to catch(IException ...). I guess it'd be ok to simply change the docs to instruct people to always use IException, but I do think it's more intuitive that catch(Exception) catches everything. Moreover, I agree that intentionally creating exceptions that leak shouldn't be done. If it's thrown it's meant to be caught -- IMHO. Hans

« previous php.internals (#7884) next »