catch exception in Talend studio

Viewed 27

How can we catch the exception in route from server in Talend studio and then display the custom message accordingly? For example if server throws System.InvalidOperationException we catch the exception and throws "Invalid certificate" Error. I checked all the documentation but could not find any useful information. So please if some one can guide or provide some link.

1 Answers

You can use the cOnException component and add the Java exception to the list. You should check the 'Handle the exceptions' box to break the original route. You can treat the message outgoing from the cOnException component as needed. For instance, the message generated by the exception can be found in the CamelExceptionCaught property.

Related