You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by GitBox <gi...@apache.org> on 2019/04/26 09:38:12 UTC

[GitHub] [sling-org-apache-sling-distribution-journal] tmaret commented on a change in pull request #3: SLING-8374 Missing out exceptions in catch clause in DistributionSubs…

tmaret commented on a change in pull request #3: SLING-8374 Missing out exceptions in catch clause in DistributionSubs…
URL: https://github.com/apache/sling-org-apache-sling-distribution-journal/pull/3#discussion_r278875305
 
 

 ##########
 File path: src/main/java/org/apache/sling/distribution/journal/impl/subscriber/DistributionSubscriber.java
 ##########
 @@ -552,8 +553,12 @@ private void importPackage(PackageMessage pkgMsg, long offset, long createdTime)
 
             Event event = DistributionEvent.eventImporterImported(pkgMsg, subAgentName);
             eventAdmin.postEvent(event);
-        } catch (Exception e) {
+        } catch (Throwable e) {
             distributionMetricsService.getFailedPackageImports().mark();
+            // rethrow fatal exceptions
+            if (e instanceof VirtualMachineError) {
 
 Review comment:
   We should re-throw all {{java.lang.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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services