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 2020/07/07 14:00:09 UTC

[GitHub] [sling-org-apache-sling-distribution-journal-messages] tmaret commented on a change in pull request #3: SLING-9569: Emit error code when error event received if available

tmaret commented on a change in pull request #3:
URL: https://github.com/apache/sling-org-apache-sling-distribution-journal-messages/pull/3#discussion_r450886482



##########
File path: src/main/java/org/apache/sling/distribution/journal/ExceptionEventSender.java
##########
@@ -46,6 +47,12 @@ private Event createErrorEvent(Exception e) {
         Map<String, String> props = new HashMap<>();
         props.put(KEY_TYPE, e.getClass().getName());
         props.put(KEY_MESSAGE, e.getMessage());
+        if (e instanceof MessagingException) {

Review comment:
       One small suggestion, instead of using instanceof, we may override the method `createErrorEvent` with a method that passes a `MessagingException` as argument.




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