freemarker-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lalish-Menagh, Trevor" <t...@trevreport.org>
Subject TemplateExceptionHandlerType
Date Thu, 07 Apr 2016 05:57:30 GMT
Hello FreeMarker Devs,

Which I was working with FreeMarker, I ran into the issue of wanting to
configure my TemplateExceptionHandler type from a standard properties file.
Unfortunately, there is no mapping to the
static TemplateExceptionHandler types to a String equivalent that I could
use in properties.

I solved this by creating a TemplateExceptionHandlerType enum with a
getHandler() method that allows you to get a
standard TemplateExceptionHandler by String name as follows:

    TemplateExceptionHandlerType.valueOf("RETHROW_HANDLER").getHandler());

I have attached my code change, including unit test, as a patch file in
this email for peer review.

Yours,
Trevor
-- 
Trevor Lalish-Menagh
about.me/trevmex

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message