How to now if fetch() failed ?

From: Date: Wed, 03 Dec 2003 13:46:43 +0000
Subject: How to now if fetch() failed ?
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10623@lists.php.net to get a copy of this message
Hello all, I'm looking for a way to know then a $smarty->fetch() (or display) failed. I'm using dynamics templates in my own MVC framework and was looking for a way to catch error during the fetch() command. My main purpose is to catch the 'Smarty error: unable to read resource:' then Smarty don't find the template file. I would like to avoid to check the existence of the template before doing the fetch() to avoid duplicating what Smarty do internally. I did look at the Smarty code, but didn't see a good way to do it. Then the fetch() command failed, it return an empty string, but a template can also return an empty string. I didn't find if Smarty trigger an Internet error flag then an error occur (beside the trigger_error() call). By the way, thx for the job done with Smarty. I keep crying then I have to change code made before using Smarty :-) Thx, Chris, www.rezotech.com

« previous php.smarty.general (#10623) next »