velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark D. Anderson" <...@discerning.com>
Subject Re: catching unbound methods?
Date Sun, 13 Oct 2002 17:41:44 GMT
> i suggest you RTM (read the manuals) more carefully.  looking into the code
> at ASTMethod.java and such is NOT the way to begin.

I've read them til I'm blue in the face; they don't give any sort of precise
description of how reflection is applied nor what happens when lookup fails.

The point of my example was that "week" was misspelled as "weak".
Thus
   $calendar.getFirstDayOfWeak()
is interpolated as an empty string (in my experience) with no warning at all.
This makes templates very fragile. The person wanted:
   $calendar.getFirstDayOfWeek()
Thus typos in method names go undetected.

This is not one of the existing EventHandlers -- you can get called if
a method invocation throws, but not if it does not exist.

-mda



--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message