use of org.mule.runtime.core.internal.message.DefaultExceptionPayload in project mule by mulesoft.
the class AbstractSystemExceptionStrategy method handleException.
@Override
public void handleException(Exception ex, RollbackSourceCallback rollbackMethod) {
fireNotification(ex, getCurrentEvent());
resolveAndLogException(ex);
logger.debug("Rolling back transaction");
rollback(ex, rollbackMethod);
ExceptionPayload exceptionPayload = new DefaultExceptionPayload(ex);
if (getCurrentEvent() != null) {
PrivilegedEvent currentEvent = getCurrentEvent();
currentEvent = PrivilegedEvent.builder(currentEvent).message(InternalMessage.builder(currentEvent.getMessage()).exceptionPayload(exceptionPayload).build()).build();
setCurrentEvent(currentEvent);
}
if (ex instanceof ConnectException) {
((ConnectException) ex).handleReconnection(retryScheduler);
}
}
Aggregations