@Override public boolean evaluate(Object object) { if (VoidMuleEvent.getInstance().equals(object) || object == null) { return false; } MuleEvent event = (MuleEvent) object; ExceptionPayload ep = event.getMessage().getExceptionPayload(); return ep != null && ep.getException() != null; } };
/** * Returns a {@link NavigableMap} in which the key is a zero-based route index * and the value is an {@link Throwable} generated by it. Notice that this is a * collect operation. Each time this method is invoked the result will be * re-calculated * * @return a @{link {@link NavigableMap}. It could be empty but it will never be * <code>null</code> */ public NavigableMap<Integer, Throwable> collectRouteExceptions() { NavigableMap<Integer, Throwable> routes = new TreeMap<Integer, Throwable>(); for (int i = 0; i < this.events.size(); i++) { MuleEvent event = this.events.get(i); if (failedEventsPredicate.evaluate(event)) { routes.put(i, event.getMessage().getExceptionPayload().getException()); } } return routes; }
/** * Always accept MessageRedeliveryException exceptions if this rollback exception strategy handles redelivery. */ @Override protected boolean acceptsEvent(MuleEvent event) { return event.getMessage().getExceptionPayload().getException() instanceof MessageRedeliveredException && this.hasMaxRedeliveryAttempts(); }
/** * Check a given message against this filter. * * @param message a non null message to filter. * @return <code>true</code> if the message matches the filter */ public boolean accept(MuleMessage message) { ExceptionPayload epl = message.getExceptionPayload(); if (getExpectedType() == null) { return epl != null; } else if (epl != null) { return getExpectedType().isAssignableFrom(epl.getException().getClass()); } else { return false; } }
private MessagingException getExceptionForCreatingFailureResponse(MessagingException messagingException, MuleEvent response) { MessagingException e = messagingException; if (response != null && response.getMessage().getExceptionPayload() != null && response.getMessage().getExceptionPayload().getException() instanceof MessagingException) { e = (MessagingException) response.getMessage().getExceptionPayload().getException(); } return e; }
public MuleEvent process(MuleEvent event) throws MuleException { if (event != null && !VoidMuleEvent.getInstance().equals(event)) { MuleMessage resultMessage = event.getMessage(); if (resultMessage != null) { if (resultMessage.getExceptionPayload() != null) { setExceptionDetails(resultMessage, connector, resultMessage.getExceptionPayload() .getException()); } } } return event; }
if (ep != null) return ep.getException();
src = this.getException(message.getExceptionPayload().getException());
@Override public Object transformMessage(MuleMessage message, String outputEncoding) throws TransformerException { ExceptionPayload ep = message.getExceptionPayload(); Throwable e = ep.getException(); Throwable re = ep.getRootException(); String cid = message.getCorrelationId(); log.warn("CorrId: {}, Error: {}, {}", new Object[] {cid, e, re}); String errorText = e.getMessage(); if (re != null) { errorText += ", " + re.getMessage(); } LastUnsuccessfulSynchErrorType error = new LastUnsuccessfulSynchErrorType(); error.setCausingAgent(CausingAgentEnum.VIRTUALIZATION_PLATFORM); error.setCode(Integer.toString(ep.getCode())); error.setText(errorText); String logicalAddress = message.getInvocationProperty("logical-address"); message.setExceptionPayload(null); message.setPayload(new Object[] {logicalAddress, error}); return message; } }
if (reply.getExceptionPayload() != null) throw findDeclaredMethodException(method, reply.getExceptionPayload().getException());
responseEvent = event.getFlowConstruct().getExceptionListener().handleException((Exception) t, event); if (responseEvent != null && responseEvent.getMessage().getExceptionPayload() != null && responseEvent.getMessage().getExceptionPayload().getException() instanceof MessagingException) message = responseEvent.getMessage().getExceptionPayload().getException().getMessage();
muleMessage.getExceptionPayload().getException(), null);
response.getMessage().getExceptionPayload().getException() instanceof MessagingException) e = (Exception) response.getMessage().getExceptionPayload().getException();
&& resultEvent.getMessage() != null && resultEvent.getMessage().getExceptionPayload() != null && resultEvent.getMessage().getExceptionPayload().getException() instanceof FilterUnacceptedException)
Throwable cause = resMessage.getExceptionPayload().getException(); if (cause instanceof ComponentException)