[TYPO3-mvc] How to catch the exceptions???

Daniel Dimitrov danielsd_bg at yahoo.fr
Thu Sep 2 12:39:48 CEST 2010


Hey guys,
Extbase is so nice, it even throws exceptions at us :)

What I don't understand is how to catch those Exceptions :)

For example:
public function showAction(Tx_BwShop_Domain_Model_Product $product) {

}

If in the url we have product= something that doesn't exist extbase will 
throw this exception:

Tx_Extbase_MVC_Exception_InvalidArgumentValue

The value must be of type "Tx_BwShop_Domain_Model_Product", but was of type 
"NULL".

How can I catch this exception and show a meaningful explanation to the 
user???

Kind Regards,
Daniel 



More information about the TYPO3-project-typo3v4mvc mailing list