You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (JIRA)" <ji...@apache.org> on 2014/03/18 14:26:07 UTC

[jira] [Updated] (SLING-3459) sling:call should not log exceptions with the full stacktrace

     [ https://issues.apache.org/jira/browse/SLING-3459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konrad Windszus updated SLING-3459:
-----------------------------------

    Description: 
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).

  was:
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 only logged once in the log (by the code responsible to catch the JspException).


> 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)