You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2021/01/25 18:06:45 UTC

[GitHub] [sling-org-apache-sling-jcr-packageinit] kwin commented on a change in pull request #3: SLING-10089 - adding logic & test to consider failing on error in exe…

kwin commented on a change in pull request #3:
URL: https://github.com/apache/sling-org-apache-sling-jcr-packageinit/pull/3#discussion_r563933930



##########
File path: src/main/java/org/apache/sling/jcr/packageinit/impl/ExecutionPlanRepoInitializer.java
##########
@@ -163,6 +163,9 @@ public void processRepository(SlingRepository slingRepository) throws Exception
                         builder.with(session);
                         ExecutionPlan xplan = builder.execute();
                         if (xplan.getTasks().size() > 0) {
+                            if (xplan.hasErrors()) {
+                                throw new IllegalStateException("Excecutionplan execution contained errors - cannot complete repository initialization.");

Review comment:
       It would be good to include the errors from the tasks in the exception. That way debugging is way easier.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org