i am getting inconsistent behaviour:

i put an object (foo) in the context that has the method:

public String getBar() throws Exception e {
  throw new Exception();
}

i write in my template:

$foo.getBar(), then i get a MethodInvocationException from which i can use
getWrappedThrowable() to access the exception (great).  and

Tue Apr 17 13:05:48 GMT+00:00 2001  [error] Method getBar threw
exception for reference $foo in template test/TemplateServletTest.vm at
[41,4]

in the log

but if i write:

$foo.Bar, i simply get

$foo.Bar

printed on my page and a comment in the log:

Tue Apr 17 13:03:52 GMT+00:00 2001   [warn]
org.apache.velocity.runtime.exceptio
n.ReferenceException: reference : template = test/TemplateServletTest.vm
[line 4
1,column 4] : $foo.Baris not a valid reference.


i would have thought than $foo.getBar() and $foo.Bar should produce the same
result?

cheers

timj

Reply via email to