in src/main/java/org/apache/sling/distribution/journal/ExceptionEventSender.java [46:57]
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) {
String errorCode = ((MessagingException) e).getResponseCode();
if ((errorCode != null) && !errorCode.isEmpty()) {
props.put(KEY_ERROR_CODE, errorCode);
}
}
return new Event(ERROR_TOPIC, props);
}