Should the PHP community start using more discriptive Exceptions?
- by fireeyedboy
I work with Zend Framework a lot and I just took a peek at Kohana, and it strikes me as odd that this is a typical scenario in these frameworks:
throw Some_Componenents_Exception( 'invalid argument' );
Where I believe this wouldn't be mouch more useful:
throw Some_Components_InvalidArgumentException( 'whatever discription' );
Because it is easier to catch.
I suspect, but immediately admit it's prejudiced, that the former practice is common in the PHP community. Should we, the PHP community, start using these descriptive types of expections more?