protected void doProcess(MuleEvent event) throws MuleException, MessagingException { try { ownedMessageProcessor.process(event); } catch (MessagingException e) { if (splitter.equals(e.getFailingMessageProcessor()) || filter.equals(e.getFailingMessageProcessor())) { // Make sure the context information for the exception is relative to the ForEach. e.getInfo().remove(INFO_LOCATION_KEY); throw new MessagingException(event, e, this); } else { throw e; } } }
@Override public MuleEvent execute(MessageProcessor messageProcessor, MuleEvent event) throws MessagingException { try { return messageProcessor.process(event); } catch (MessagingException messagingException) { if (messagingException.getFailingMessageProcessor() == null) { throw putContext(messagingException, messageProcessor, event); } else { throw putContext(messagingException, messagingException.getFailingMessageProcessor(), event); } } catch (Throwable ex) { throw putContext(new MessagingException(event, ex, messageProcessor), messageProcessor, event); } }