This is fixed in source code. Eventually to be released in version 1.5. In the meantime, you can use the nightly snapshot.

http://cvs.apache.org/snapshots/velocity/

WILL

----- Original Message ----- From: "Jack Holt" <[EMAIL PROTECTED]>
To: "Velocity Users List" <[email protected]>
Sent: Wednesday, June 01, 2005 12:08 PM
Subject: No conditional #stop? / Validating that a parameter was passed in code


Correct me if I am wrong, but it appears that #stop is not intended to
be used conditionally.

I saw this behavior when trying to write the following macro:

#macro(test $p $n)
#if($!p == "")
$n is required
               #stop
#end
#end

#test($var "var")

I tried the above code in VeloGUI and noticed that velocity throws a
ParseErrorException with a message of Encountered "EOF" at line 4,
column 17

Am I right about this and (on a separate subject) is there a better
way to validate that a parameter was passed to a Velocity template

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to