bkkothari2255 commented on code in PR #85:
URL: 
https://github.com/apache/sling-org-apache-sling-models-impl/pull/85#discussion_r2981418482


##########
src/main/java/org/apache/sling/models/impl/ModelPackageBundleListener.java:
##########
@@ -200,6 +200,13 @@ private void analyzeClass(Bundle bundle, String className, 
List<ServiceRegistrat
                     bundle.getSymbolicName(),
                     e.getLocalizedMessage(),
                     e);
+        } catch (LinkageError e) {

Review Comment:
   Hey, I've seen this pattern cause headaches in AEM projects before. 
`LinkageError` is quite a wide net — it'll also swallow things like 
`IncompatibleClassChangeError` and `VerifyError` which usually mean something 
is genuinely broken in the model, not just an optional dep that's missing.
   
   In our case the missing interface scenario from SLING-13143 will always 
throw `NoClassDefFoundError` specifically, so I'd narrow this down:
   
   `catch (NoClassDefFoundError e)`
   
   Otherwise we risk debugging a broken model for hours not realizing the 
framework quietly swallowed the real error.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to