> it produces a warning - and it should, since what is being done is what usually should not be done
I didn't want to turn this into an "error handling best practices" discussion. Exceptions might not be recommended to use for flow-control, yet this is possible today and really depends on the exception type itself and it's fallback handling: try { $o = $container->get('id'); } catch (ServiceNotFoundException) { $o = $container->get('other_id'); } Leaving out the $e variable makes the lack of error handler more explicit. Roland, Op do 21 feb. 2019 om 20:35 schreef Stanislav Malyshev <smalys...@gmail.com >: > Hi! > > > Allthough global exception catching might not be a good practice per se, > I > > don't see a real reason to forbid it. However, these are 2 independent > > features that can be voted for I guess. > > It's not forbidden now. But there's no reason to encourage it and > develop a dedicated syntax for it. Current syntax works just fine. Yes, > it produces a warning - and it should, since what is being done is what > usually should not be done - ignoring exceptions. > > -- > Stas Malyshev > smalys...@gmail.com >