You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Jörg Hoh (JIRA)" <ji...@apache.org> on 2018/08/21 15:57:00 UTC
[jira] [Commented] (SLING-7843) exception message is lost inside
Scripting JSP error handler
[ https://issues.apache.org/jira/browse/SLING-7843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16587631#comment-16587631 ]
Jörg Hoh commented on SLING-7843:
---------------------------------
The attached patch initializes the exMessage variable in any case with the details of the exceptions; it might be overruled or ignored within the following code, but it will never causing an empty message being thrown.
> exception message is lost inside Scripting JSP error handler
> ------------------------------------------------------------
>
> Key: SLING-7843
> URL: https://issues.apache.org/jira/browse/SLING-7843
> Project: Sling
> Issue Type: Improvement
> Components: Scripting
> Affects Versions: Scripting JSP 2.3.4
> Reporter: Jörg Hoh
> Priority: Major
> Attachments: SLING-7843.patch
>
>
> I came across a case where the error handling of the JSP scripting doesn't include the message when wrapping the original exception; that means that the details of the exceptions are only available at the deepest level:
> {code}
> Caused by: org.apache.sling.api.SlingException:
> at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspExceptionInternal(JspServletWrapper.java:691) [org.apache.sling.scripting.jsp:2.2.7.B002]
> at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:608) [org.apache.sling.scripting.jsp:2.2.7.B002]
> at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:533) [org.apache.sling.scripting.jsp:2.2.7.B002]
> at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:449) [org.apache.sling.scripting.jsp:2.2.7.B002]
> at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:346) [org.apache.sling.scripting.jsp:2.2.7.B002]
> at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.java:101) [org.apache.sling.scripting.jsp:2.2.7.B002]
> at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngineFactory.java:607) [org.apache.sling.scripting.jsp:2.2.7.B002]
> at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:388) [org.apache.sling.scripting.core:2.0.54]
> ... 146 common frames omitted
> Caused by: org.apache.sling.api.resource.ResourceNotFoundException: Resource at '/content/company/page.html' not found: No resource found
> at org.apache.sling.servlets.get.impl.DefaultGetServlet.doGet(DefaultGetServlet.java:282) [org.apache.sling.servlets.get:2.1.30]
> at org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:266) [org.apache.sling.api:2.16.4]
> at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) [org.apache.sling.api:2.16.4]
> at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) [org.apache.sling.api:2.16.4]
> {code}
> It would be much better if the wrapping exceptions contain the details as well.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)