There are no built-in means of throwing exceptions.  you could try
using the #stop directive (i think that was fixed in version 1.5).  or
you could create a "tool" (just a simple java object) that has a
throwException() method, put an instance of it in the context and call
that method.

$mytool.throwException()

On Sat, Apr 5, 2008 at 11:50 AM, Ittay Dror (Freiman)
<[EMAIL PROTECTED]> wrote:
> I want to write a template that generates different outputs based on a
>  property value. say the value can be "A" or "B". Now, if the user passes
>  something else, I want to signal an error. so my template looks something
>  like:
>  # if...
>  .....
>  #elseif
>  ....
>  #else
>  // throw an exception? how?
>  #end
>
>  Thank you,
>  Ittay
>

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

Reply via email to