freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roli Züger (JIRA) <j...@apache.org>
Subject [jira] [Commented] (FREEMARKER-5) Suppress logging of exceptions
Date Thu, 29 Oct 2015 12:14:27 GMT

    [ https://issues.apache.org/jira/browse/FREEMARKER-5?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14980327#comment-14980327
] 

Roli Züger commented on FREEMARKER-5:
-------------------------------------

You're right, somehow I overlooked the setting. That covers what we need. Thank your for your
quick response.

Our use case (for the sake of completeness):
We're using Freemarker in our CMS and we're querying our database in the TemplateDirectiveModel.
If the requested data is missing, we want our CMS to respond with HTTP status 404. To accomplish
this we throw a "ContentNotFoundException" which will be "converted" into a 404 response before
the servlet terminates.

> Suppress logging of exceptions
> ------------------------------
>
>                 Key: FREEMARKER-5
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-5
>             Project: Apache Freemarker
>          Issue Type: Wish
>            Reporter: Roli Züger
>
> According to the documentation all exceptions are logged. Even if there is a special
TemplateExceptionHandler, logging of a certain exception cannot be suppressed.
> (see also freemarker.core.Environment#handleTemplateException)
> At some points we want to exit the template rendering process by throwing an exception
(from our TemplateDirectiveModel implementations). We're handling these exceptions later and
don't want them to clutter the log files.
> Documentation: http://freemarker.org/docs/pgui_config_errorhandling.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message