How to get the job error message from a route ?

Six Stars

How to get the job error message from a route ?

Hi there,

 

I find this topic https://community.talend.com/t5/Design-and-Development/How-to-get-the-error-message-inside-Route-cOn... which talk about how to get the exception in a route. But it didn't answer at what I want to do.

 

1.jpg

 

I have a cOnException in my Route, and I would like to catch :

- the error message (which can be raised by a tDie) of my jobs

- the name of the job which is problematic

- the name of my current route (which must be : exchange.getContext().getName())

 

How can I get these information ?

 

Moreover, I have configure my cOnExeption as this, is that ok ?

2.jpg

 

The conversation above does not answer what I would like to do.

 

Thank you for your help !

Tags (2)
Moderator

Re: How to get the job error message from a route ?

Hello,

java.lang.Exception should catch all Exceptions for you. If you want to catch absolutely anything that could be thrown by the Route, you could try using java.lang.Exception and java.lang.Throwable.

Both tDie and tWarn components are closely related to the tLogCatcher component.They generally make sense when used alongside a tLogCatcher in order for the log data collected to be encapsulated and passed on to the output defined.

What does your DI job design look like?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read