Does anybody know how to handle Unchecked / Runtime Exceptions in MULE..??
I mean, in my java code, for a certain reason , i am "throwing an Exception" and i want Mule to detect it and route it to proper flow , where i can Log or Print that Exception.
So , What exactly should i place in my "flow" in Mule Config File to achieve that.
My Java code :
public Object xyz (Map payload) throws Exception {
if (payload.isEmpty()) {
throw new Exception ("New Exception") ;
}
}
My Mule Config file :
<flow name="APIAuthenticate">
<http:inbound-endpoint address="http://localhost:1212/jcore/authorize" transformer-refs="HttpParams" responseTransformer-refs="JavaObjectToJson" contentType="application/json" encoding="UTF-8">
<not-filter>
<wildcard-filter pattern="/favicon.ico"/>
</not-filter>
</http:inbound-endpoint>
<component class="main.java.com.abc.XYZ"/>
</flow>
Any help will be deeply appreciated..!!