From: Marc P. <ma...@an...> - 2006-03-28 16:11:05
|
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 (ma...@an...) Consultant/Analyst AnyWare Ltd. http://www.anyware.co.uk/ |