Title: RE: more nits to pick

This is a different experiment in avoiding HTML.  It
may not work.  I'll know if it doesn't, so there is no
need to tell me....

> you mean a reference called
>
> $2d6?
>
> Because references must start with a letter.
>
> From the VTL reference guide : [deleted]

You missed my main points.  I know (now) that it is
illegal.  My points were: 1. the top exception said
that it could not find a template, when in fact, there
was a syntax error in the template. 2. WHY should
identifiers be limited to starting with a letter?
Since they can be lexically known by the $ at the
start, why not let $2d6 be legal?

> > BTW: I like the idea of a template returning ...
> > [deleted for brevity]
>
> ?

Let me try again.  Lets say you put a syntax error
in a template.  Something like $2.  Right now what
will happen:
    1a. Can't find a template exception (with a more
       descriptive exception down the stack).
    2a. getTemplate() returns NULL.
    3a. Text message in velocity.log
My suggestion is these things happen:
    1b. The top level exception should be the more
       descriptive syntax error, not the "can't find
       template" error.
    2b. getTemplate() returns a template which, when
       used, will always generate the text string
       description of the syntax error in the template.
    3b. Text message in the log file doesn't hurt anything,
       but now, almost no one will use it, because the
       error message came out when they tried to use the
       template.

Joshua

Reply via email to