Re: Infinite loop with CountDirective

"Eric B. Ridge" <[email protected]> Tue, 28 Mar 2006 11:19:51 -0500
Newsgroups gmane.comp.java.webmacro.user
Message-ID <[email protected]>
On Mar 28, 2006, at 11:09 AM, Marc Palmer wrote:

> Isn't this what gives us the "<!-- Variable XXXX is undefined -->"  
> type output in the templates? That's much more helpful - and  
> sometimes a quick fix for null checking in a hacked together  
> prototype - than it spewing a property exception and failing to  
> build the page...

Yes and no.  The ExceptionHelper (or whatever it's called) generally  
traps all the PropertyExceptions, looks at the innards for things  
like UndefinedMacro, null objects, etc, and makes the determination  
about what to do.  So he's the guy that writes out the <!-- Variable  
XXX is undefined --> stuff.

We'd probably need to tighten up some try/catch blocks to make sure  
we're passing exceptions into the ExceptionHelper (or whatever it's  
called!), but that still seems better than having code that can  
accidently cause an infinite loop.

eric



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642