[ https://issues.apache.org/jira/browse/SLING-6637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15924181#comment-15924181 ]
Feike Visser commented on SLING-6637: ------------------------------------- thanks [~radu.cotescu] for your reply. So in order to avoid this exception devs will need to check if the resource exists, what would be the best way for these use cases? > [htl] data-sly-use should not raise an exception when resource doesn't exist > ---------------------------------------------------------------------------- > > Key: SLING-6637 > URL: https://issues.apache.org/jira/browse/SLING-6637 > Project: Sling > Issue Type: Bug > Components: Scripting > Reporter: Feike Visser > Assignee: Radu Cotescu > > Following code: > {code} > <sly data-sly-use.x="${ 'x/y/z' }"/> > {code} > You get now the following exception: > {code} > org.apache.sling.scripting.sightly.SightlyException: No use provider could > resolve identifier x/y/z > {code} > In practice you want to have a null-value assigned to x, now developers will > make a lot of checks to make sure the resource does exist. -- This message was sent by Atlassian JIRA (v6.3.15#6346)