velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <>
Subject Re: catching unbound methods?
Date Sun, 13 Oct 2002 18:49:25 GMT
On 10/13/02 2:28 PM, "Nathan Bubna" <> wrote:

> Mark said:
>> Nathan said:
>>> i suggest you RTM (read the manuals) more carefully.  looking into the
> code
>>> at 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.
> anyway, to deal more with your complaint...  again i repeat, you were wrong
> to say that plain $somenull references in the templates cause errors or
> warnings to be logged.   null reference errors are logged ONLY when the
> $somenull or $foo.somenull reference is within a VTL directive.
> now, i can see someone having cause to need or want the *option* to log
> warnings when such references are encountered, but for myself, those would
> just annoy me.  as it is, i am occasionally annoyed by the errors logged
> when i do #set( $foo = $somenull ).   i have in the past, and will continue
> to support making such VTL valid and functional (i.e. having that code set
> the $foo reference to null instead of leaving it's previous value).  so, to
> get to my point, i don't agree that the current behaviour is a big problem.
> i was just trying to explain to you what the current behaviour is since you
> seem to be confused about it.

I just want to note that you can get Velocity to tell you when it encounters
things that appear to be references ($<foo>) but don't have any backing
value.  There is a configuration parameter :

As a constant :


or as a string literal


Set this to true and Velocity should log any non-quiet reference like
thingies w/o backing data.


Geir Magnusson Jr.                                    +1-203-355-2219 (w)
Adeptra Inc.                                         +1-203-247-1713 (m)

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message