You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Chris Kimpton <ch...@kimptoc.net> on 2001/03/12 22:19:13 UTC

How do I get an exception for a null macro expansion

Hi,

Is there a way to turn on strict expansion of macros?

That is, if I have a template like this

Hello $name!

and the context entry 'name' is , then the output I get is  "Hello $name".

I know I can use $!name to get a space instead - but I would rather get an
exception in my app, so that it can report the problem.

Is there a configuration option to turn on stricter parsing?

Thanks in advance,
Chris