[
https://issues.apache.org/jira/browse/SLING-3459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13976579#comment-13976579
]
ASF GitHub Bot commented on SLING-3459:
---------------------------------------
GitHub user kwin opened a pull request:
https://github.com/apache/sling/pull/14
SLING-3459, do not log exceptions which are rethrown
Do not log exceptions which are rethrown, to prevent stacktraces from
appearing twice in the log. The original bug report is at
https://issues.apache.org/jira/browse/SLING-3459.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kwin/sling SLING-3459
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/sling/pull/14.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #14
----
commit 5b7bf401deab2051a8f432947aa6dd7bdf6cabe6
Author: Konrad Windszus <[email protected]>
Date: 2014-04-22T09:18:48Z
SLING-3459, do not log exceptions which are rethrown
----
> sling:call should not log exceptions with the full stacktrace
> -------------------------------------------------------------
>
> Key: SLING-3459
> URL: https://issues.apache.org/jira/browse/SLING-3459
> Project: Sling
> Issue Type: Bug
> Components: Scripting
> Affects Versions: Scripting JSP-Taglib 2.1.8
> Reporter: Konrad Windszus
>
> Currently within the sling:call tag all exceptions are both logged on error
> level and rethrown
> (https://fisheye6.atlassian.com/browse/~br=trunk/sling/trunk/bundles/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/CallTag.java?r=1398589&r=1520554&r=1398589#to139).
> That is not a good practice, because the same stack traces would appear
> twice in the log (once for the generic exception, logged by the CallTag and
> once for the wrapped JspException).
> Rather do not log the exception within the CallTag and leave that to other
> handlers. Just rewrapping the exception into the JspException should be
> enough. No information would be lost that way, and stack traces would only be
> logged once (by the code responsible to catch the JspException).
--
This message was sent by Atlassian JIRA
(v6.2#6252)