velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark D. Anderson" <...@discerning.com>
Subject catching unbound methods?
Date Sun, 13 Oct 2002 03:01:11 GMT
I'm still trying to get an answer regarding how to catch unbound methods
(usually due to typing errors in templates).
Here is my question from before.

Thanks for any help....

-mda

----- Original Message ----- 
From: "Mark D. Anderson" <mda@discerning.com>
To: "Velocity Users List" <velocity-user@jakarta.apache.org>
Sent: Monday, September 30, 2002 4:51 PM
Subject: catching syntax and spelling errors


If there is a VTL syntax error such as:
   #esle
then an exception is thrown.

If there is an unbound symbol such as 
   $claendar
then there is an event and (by default) a log warning.

The same is true (I believe) if there is a reference to an unbound member:
  $calendar.FirstDayOfWeak

But if there is a spelling mistake in a method name:
  $calendar.getFirstDayOfWeak()
Then there is no warning, no event, no nothing.

It is hard to tell with a speed-read where that might be done, but looking at
     org/apache/velocity/runtime/parser/node/ASTMethod.java
it appears that a missing method circumstance is just dropped on the floor.

Or maybe I'm missing something.....

-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