freemarker-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Dekany <ddek...@freemail.hu>
Subject Re: Rethrow error after recover block ?
Date Sat, 21 May 2016 15:18:36 GMT
There's nothing built in for re-throwing... but since you want to
terminate the whole template processing, couldn't you just use a
TemplateExceptionHandler instead (see
http://freemarker.org/docs/pgui_config_errorhandling.html)?


Saturday, May 21, 2016, 3:00:32 PM, Albert Kam wrote:

> Hi,
>
> My intention is to print out some values upon <#recover> block, and
> rethrow the error without continuing the processes.
>
> <#macro xxx>
>
> <#attempt>
>     <#-- main() -->
> <#recover>
>     <#-- print out messages here -->
>     <#-- rethrow error, ***how to do this *** -->
> </#attempt>
> <#-- so that we dont continue processing the lines here -->
>
> </#macro>
>
> Thank you !
>

-- 
Thanks,
 Daniel Dekany


Mime
View raw message