On Tue, Jan 27, 2009 at 6:12 AM, Kornel Lesiński <kor...@aardvarkmedia.co.uk
> wrote:

>
> This works only for external macros. I've just committed improved exception
> handling that allows fallback for local macro names:
>
> class MyTemplateFramework extends PHPTAL {
>        public function executeMacro($path)
>        {
>                try
>                {
>                        parent::executeMacro($path);
>                }                catch(PHPTAL_MacroMissingException $e)
>                {
>
>  parent::executeMacro($this->default_macro_file.'/'.$path);
>                }
>        }
> }
>
>
Assuming that unwinding when handling exceptions is more time consuming than
using if/else mechanism, wouldn't it be better to build this ability into
PHPTAL?
_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to