Re: [Cheetahtemplate-discuss] ErrorCatcher
Brought to you by:
rtyler,
tavis_rudd
From: Christopher A. <chr...@we...> - 2007-02-09 23:26:09
|
Mike Orr schrieb: > On 2/9/07, Gerhard Schaden <gsc...@gm...> wrote: >> It looks like the ErrorCatcher support does not work, and that it never >> worked. > > What do you mean it doesn't work? It works for me. (Cheetah 2.0rc7, > Python 2.4.3, Linux) Now try this: ---> Base.tmpl <--- #errorCatcher BigEcho $bar #block echo_foo Here comes foo $foo #end block ---> end <--- ---> error.tmpl <--- #extends Base #errorCatcher BigEcho #def echo_foo Here comes error.tmpl's foo $foo #end def ---> end <--- $ PYTHONPATH="." cheetah fill -p error.tmpl [...] File "error_tmpl.py", line 89, in echo_foo NameMapper.NotFound: cannot find 'foo' If I comment out $foo in error.tmpl, it is working, i.e. I get: ===============<$bar could not be found>=============== Here comes error.tmpl's foo So it seems #errorCatcher is not working for templates that inherit from another template. It makes no difference whether I use BigEcho or plain Echo. Chris |