Reputation: 4415
How can I return error status information from a tJava component in Talend so that the on component error trigger can be used? I have custom code inside the tJava component that may throw exception. In such a situation, I would like to call tDie from tJava using the on component error trigger.
Upvotes: 2
Views: 1443
Reputation: 4415
This turned out to be quite simple to achieve. Given the design:
The tJava component in the middle contained code to generate exception:
String a = null;
String b = "bar";
a.equalsIgnoreCase(b);
Running the job printed the exception and the message from tDie:
Exception in component tJava_1
java.lang.NullPointerException
at mrx_talend.test_0_1.test.tJava_1Process(test.java:374)
at mrx_talend.test_0_1.test.runJobInTOS(test.java:842)
at mrx_talend.test_0_1.test.main(test.java:699)
Exiting due to processing failure
Upvotes: 1