@Override public void processExceptionReplyTo(MessagingException exception, Object replyTo) { exception.setProcessedEvent(createReturnEventForParentFlowConstruct(exception.getEvent(), event)); replyToHandler.processExceptionReplyTo(exception, null); } }, getExceptionListener());
@Override protected MuleEvent processCatch(MuleEvent event, MessagingException exception) throws MessagingException { ((ThreadSafeAccess) eventToEnrich).resetAccessControl(); OptimizedRequestContext.unsafeSetEvent(eventToEnrich); exception.setProcessedEvent(eventToEnrich); return super.processCatch(event, exception); }
return event; } catch (MessagingException messagingException) { messagingException.setProcessedEvent(event); throw messagingException; } catch (Exception e) {
return event; } catch (MessagingException messagingException) { messagingException.setProcessedEvent(event); throw messagingException; } catch (Exception e) {
return event; } catch (MessagingException messagingException) { messagingException.setProcessedEvent(event); throw messagingException; } catch (Exception e) {
return event; } catch (MessagingException messagingException) { messagingException.setProcessedEvent(event); throw messagingException; } catch (Exception e) {
return event; } catch (MessagingException messagingException) { messagingException.setProcessedEvent(event); throw messagingException; } catch (Exception e) {
return event; } catch (MessagingException messagingException) { messagingException.setProcessedEvent(event); throw messagingException; } catch (Exception e) {
return event; } catch (MessagingException messagingException) { messagingException.setProcessedEvent(event); throw messagingException; } catch (Exception e) {
return event; } catch (MessagingException messagingException) { messagingException.setProcessedEvent(event); throw messagingException; } catch (Exception e) {
return event; } catch (MessagingException messagingException) { messagingException.setProcessedEvent(event); throw messagingException; } catch (Exception e) {
return event; } catch (MessagingException messagingException) { messagingException.setProcessedEvent(event); throw messagingException; } catch (Exception e) {
return event; } catch (MessagingException messagingException) { messagingException.setProcessedEvent(event); throw messagingException; } catch (Exception e) {
return event; } catch (MessagingException messagingException) { messagingException.setProcessedEvent(event); throw messagingException; } catch (Exception e) {
return event; } catch (MessagingException messagingException) { messagingException.setProcessedEvent(event); throw messagingException; } catch (Exception e) {
return event; } catch (MessagingException messagingException) { messagingException.setProcessedEvent(event); throw messagingException; } catch (Exception e) {
return event; } catch (MessagingException messagingException) { messagingException.setProcessedEvent(event); throw messagingException; } catch (Exception e) {
@Override public MuleEvent execute(ExecutionCallback<MuleEvent> callback, ExecutionContext executionContext) throws Exception { try { return next.execute(callback, executionContext); } catch (MessagingException e) { MuleEvent result; if (messagingExceptionHandler != null) { result = messagingExceptionHandler.handleException(e, e.getEvent()); } else { result = e.getEvent().getFlowConstruct().getExceptionListener().handleException(e,e.getEvent()); } e.setProcessedEvent(result); throw e; } catch (Exception e) { throw e; } } }
@Override public MuleEvent process(final MuleEvent event) throws MuleException { final MuleEvent newEvent = createMuleEventForCurrentFlow(event, event.getReplyToDestination(), event.getReplyToHandler()); try { ExecutionTemplate<MuleEvent> executionTemplate = ErrorHandlingExecutionTemplate.createErrorHandlingExecutionTemplate(muleContext, getExceptionListener()); MuleEvent result = executionTemplate.execute(new ExecutionCallback<MuleEvent>() { @Override public MuleEvent process() throws Exception { return pipeline.process(newEvent); } }); return createReturnEventForParentFlowConstruct(result, event); } catch (MessagingException e) { e.setProcessedEvent(createReturnEventForParentFlowConstruct(e.getEvent(), event)); throw e; } catch (Exception e) { resetRequestContextEvent(event); throw new DefaultMuleException(CoreMessages.createStaticMessage("Flow execution exception"),e); } }
@Override public void processExceptionReplyTo(MessagingException exception, Object replyTo) { MuleEvent result; if (messagingExceptionHandler != null) { result = messagingExceptionHandler.handleException(exception, exception.getEvent()); } else { result = exception.getEvent().getFlowConstruct().getExceptionListener().handleException(exception, exception.getEvent()); } exception.setProcessedEvent(result); if (!exception.handled()) { delegate.processExceptionReplyTo(exception, replyTo); } else { try { delegate.processReplyTo(exception.getEvent(), exception.getEvent().getMessage(), replyTo); } catch (MuleException e) { delegate.processExceptionReplyTo(new MessagingException(exception.getEvent(), e), replyTo); } } } }