[
https://issues.apache.org/jira/browse/SLING-3517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13979950#comment-13979950
]
Stefan Egli commented on SLING-3517:
------------------------------------
Catching RuntimeException sounds OK - but catching Errors is trickier, as this
for example also catches OutOfMemoryError ..
.. and maybe this could even be upped to log.warn, not just log.info..
> SlingPostServlet catches all throwables and logs them at debug level
> --------------------------------------------------------------------
>
> Key: SLING-3517
> URL: https://issues.apache.org/jira/browse/SLING-3517
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Post 2.3.4
> Reporter: Laurie byrum
>
> On line 203 of
> http://grepcode.com/file/repo1.maven.org/maven2/org.apache.sling/org.apach
> e.sling.servlets.post/2.3.2/org/apache/sling/servlets/post/impl/SlingPostS
> ervlet.java#SlingPostServlet.doPost%28org.apache.sling.api.SlingHttpServle
> tRequest%2Corg.apache.sling.api.SlingHttpServletResponse%29
> it does a log.debug and turns the exception into a server error. That
> makes it much harder to get to the problem when we throw exceptions.
> I talked to Carsten and Felix about this. Felix replied:
> Should we really catch Throwable here ?
> Maybe we should limit to Exception and have Errors bubble up.
> Carsten agreed..
--
This message was sent by Atlassian JIRA
(v6.2#6252)