You have access to the global (and some other) variables through the
Environment object that's passed to
TemplateExceptionHandler.handleTemplateException(TemplateException te,
Environment env, Writer out).


Saturday, May 21, 2016, 6:54:55 PM, Albert Kam wrote:

> Hello,
>
> That did cross my mind, but i was thinking of storing debugging values
> to a global debugging variable, and upon <#recover>, i would like to
> 'dump' all the values to system.out.
>
> I'm afraid using the usual way i wont be able to access the global
> debugging value ?
>
> Thank you.
>
> On Sat, May 21, 2016 at 10:18 PM, Daniel Dekany <[email protected]> wrote:
>> 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
>>
>
>
>

-- 
Thanks,
 Daniel Dekany

Reply via email to