List<Exception> list = subUoW.getExceptions();
if (list != null) {
if (list.size() == 1) {
cause = list.get(0);
} else {
cause = new CamelUnitOfWorkException(exchange, list);
}
exchange.setException(cause);
}
// mark it as rollback and that the unit of work is exhausted. This ensures that we do not try
// to redeliver this exception (again)