Skip to content

Instantly share code, notes, and snippets.

@phaelfp
Created September 4, 2018 14:40
Show Gist options
  • Select an option

  • Save phaelfp/329f3b7e0a4348c1e99010de2e6bcaa7 to your computer and use it in GitHub Desktop.

Select an option

Save phaelfp/329f3b7e0a4348c1e99010de2e6bcaa7 to your computer and use it in GitHub Desktop.
Exemplo de tratamento de exception Mule
<choice-exception-strategy doc:name="Choice Exception Strategy">
<catch-exception-strategy doc:name="Catch Exception Strategy" when="#[exception.causedBy(org.mule.api.transformer.TransformerException)]">
<set-payload doc:name="Set Payload" value="#[payload]">
<jms:outbound-endpoint connector-ref="Active_MQ" doc:name="JMS" queue="Dead.Letter.Invalid.Data">
</jms:outbound-endpoint></set-payload></catch-exception-strategy>
<catch-exception-strategy doc:name="Catch Database Connection Exception" when="#[exception.causedBy(java.sql.SQLException)]">
<set-payload doc:name="Set Payload" value="#[payload]">
<jms:outbound-endpoint connector-ref="Active_MQ" doc:name="JMS" queue="Dead.Letter.Invalid.Data">
</jms:outbound-endpoint></set-payload></catch-exception-strategy>
<catch-exception-strategy doc:name="Catch ActiveMQ Connection Exception" when="#[exception.causedBy(java.lang.Exception)]">
<set-payload doc:name="Set Payload" value="The request cannot be processed, the error is #[exception.getSummaryMessage()] ">
<logger doc:name="Logger" level="INFO" message="Unexpected Exception: #[payload]">
</logger></set-payload></catch-exception-strategy>
</choice-exception-strategy>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment