Re: Infinite loop with CountDirective
Marc Palmer <[email protected]> Tue, 28 Mar 2006 17:09:11 +0100
| Newsgroups | gmane.comp.java.webmacro.user |
|---|---|
| Message-ID | <[email protected]> |
On 28 Mar 2006, at 17:05, Eric B. Ridge wrote: > Should this be fixed in CountDirective.java or in Variable.java? > > I haven't studied the code in forever, but if we could change > Variable.evaluate() to throw a PropertyException whenever val is an > UndefinedMacro, then it seems like we'd never end up with this sort > of bug again. > > That, or maybe UndefinedMacro.evaluate() should throw? What value > is there in trying to evaluate() an UndefinedMacro? 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... ...or am I missing something? Marc ~ ~ ~ Marc Palmer ([email protected]) Consultant/Analyst AnyWare Ltd. http://www.anyware.co.uk/ ------------------------------------------------------- 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