[TYPO3-mvc] Non existing object: how to handle the error?

Dmitry Dulepov dmitry.dulepov at gmail.com
Mon Feb 21 19:27:58 CET 2011


Hi!

Steffen Ritter wrote:
> What i do:
>
> changing
> showAction(Tx_MyExt_MyModel $model) {
>
> to
>
> showAction(Tx_MyExt_myModel $model = NULL) {
> if ($model === NULL) {
> $this->throwStatus('404', NULL, '<p>I will insert a fancy error message
> at the plugin place</p>');
> }
>
> The Error Message might be plain, text, translated or - how I do: create
> error message Templates end render them using fluid ;)

Great solution! Thanks a lot, Steffen!

-- 
Dmitry Dulepov
TYPO3 core&security team member
E-mail: dmitry.dulepov at typo3.org
Web: http://dmitry-dulepov.com/


More information about the TYPO3-project-typo3v4mvc mailing list