[Templates] Discovering if a template exists
Andy Wardley
abw@andywardley.com
Wed, 19 Mar 2003 08:26:30 +0000
Bradley Baetz wrote:
> But its the file not found error I wanted to catch, not the parse error
Sorry, my brain isn't working this week. I'm confusing your problem
with a half-remembered issue where someone really did need to check
for parse errors. I was thinking that if we can clearly detect parse
errors then everything else must be a "not found" error. Alas that's
not the case, because there are various other errors the provider can
return.
In the case of files, plugins, filters not being found, they will always
return a message of the form "$something: not found". So it should be
generally OK to check for 'not found' at the end of the string.
Sorry that it took so long for me to get a the clue :-)
A