velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Byron Foster <by...@base2.cc>
Subject Re: Template lose track of variable?
Date Thu, 22 Jan 2009 05:29:45 GMT
In Velocity 1.6 there is strict mode, property:

runtime.references.strict = true  (There's info in the docs about it)

When this is set, if $tn is null, or is not in the context, then  
velocity will throw an exception when you call USFormattedTn.  As it  
stands you can't tell if the error is occurring because $tn is non  
existent or null, or if USFormattedTn is null.

Also, this error may be happening more then you think, but because  
there is no real consequence for it, it's not getting reported very  
often.

On Jan 21, 2009, at 13:49 , Steve Cohen wrote:

> 2009-01-20 16:58:15,902 [robo/AIM:jrelay/2701] TRACE  
> velocity.VelociWrapper - {tn=203-999-9999, lang=English}
> 2009-01-20 16:58:15,910 [robo/AIM:jrelay/2701] DEBUG Velocity -  
> ResourceManager : found /resources/en_US/number/ExitComplete.vm with  
> loader org.apache.velocity.tools.view.servlet.WebappLoader
> 2009-01-20 16:58:15,911 [robo/AIM:jrelay/2701] DEBUG Velocity - Null  
> reference [template '/resources/en_US/number/ExitComplete.vm', line  
> 6, column 56] : $tn.USFormattedTn cannot be resolved.

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


Mime
View raw message