use of org.mule.runtime.api.notification.EnrichedNotificationInfo in project mule by mulesoft.
the class MessagingExceptionResolver method enrich.
private MessagingException enrich(MessagingException me, Component failing, CoreEvent event, MuleContext context) {
EnrichedNotificationInfo notificationInfo = createInfo(event, me, null);
context.getExceptionContextProviders().forEach(cp -> {
cp.getContextInfo(notificationInfo, failing).forEach((k, v) -> me.getInfo().putIfAbsent(k, v));
});
return me;
}
use of org.mule.runtime.api.notification.EnrichedNotificationInfo in project mule by mulesoft.
the class SourceErrorException method toMessagingException.
public MessagingException toMessagingException(Collection<ExceptionContextProvider> exceptionContextProviders, MessageSource messageSource) {
MessagingException messagingException = new MessagingException(CoreEvent.builder(getEvent()).error(ErrorBuilder.builder(getCause()).errorType(getErrorType()).build()).build(), getCause());
EnrichedNotificationInfo notificationInfo = createInfo(messagingException.getEvent(), messagingException, null);
exceptionContextProviders.forEach(cp -> {
cp.getContextInfo(notificationInfo, messageSource).forEach((k, v) -> messagingException.getInfo().putIfAbsent(k, v));
});
return messagingException;
}
Aggregations