Hi!

On Tue, 8 Mar 2016, Pierrick Charron wrote:

> Bronisław Białek and I would like to start a discussion about allowing 
> multiple exception types to be caught in a single catch statement.
> 
> https://wiki.php.net/rfc/multiple-catch

Would it not be better, to have your Exceptions extend a common base 
class in this case? Or perhaps, which I think is even better, to have 
your Exception classes implement a common interface that you can catch 
against. That I believe should already work.

What you are asking PHP users to do with a multiple catch like this, is 
to test in each catch's statement block to test for each class again. 
Neither the inheritence or implements options from the previous 
paragraph have that issue.

cheers,
Derick
-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to