Re: Default tag handler
| From: | Anders Janson | Date: | Fri, 21 Sep 2001 22:59:03 +0000 |
| Subject: | Re: Default tag handler | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-1517@lists.php.net to get a copy of this message | ||
Monte Ohrt wrote:
>>When would you want to use a template function that doesn't exist?
Well, I can not give any example of that :)
But sometimes my templates are edited online. The preview looks really
ugly if template tags are misspelled! A default handler could catch
what went wrong, and bring up the editor page again. Or refuse to
save the edited version into the database/file system. Or...
Today, the application does not really know if the compiler failed.
>>I think that you would WANT an error.
Monte, nobody wants errors ;)
Seriously, what I would find useful is a way to DETECT the error.
And handle it gracefully.
>> If you don't, this could get quite confusing to debug. For example,
if your default function silently returned nothing and you accidenatally
misspelled a function name, you could be pulling your hair out trying
to figure out what is wrong. cache on/off? recompile not happening?
I think anybody who would try to use such a feature knows what to do.
/Anders