[resolved] Customizing error message "For input string"

Five Stars

[resolved] Customizing error message "For input string"

Hi All,
When I am trying to read an excel file, the tFileInputExcel throws an error as follows:
"For input string "ABCD"
(This happens when my Excel value is a String and the expected value is an Integer.)
But, this error message does not seem to be descriptive. So I need to customize the error message.
How can I catch it and change?
Thanks,
thivanka.

Accepted Solutions
Moderator

Re: [resolved] Customizing error message "For input string"

Hi,
I got your point. If so, you can use "Reject" row from tfileinputxxx component which throws the error then contacting to tMap/tjavarow without checking out "Die on error" option.
See my screenshots
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.
Moderator

Re: [resolved] Customizing error message "For input string"

Hi thivanka,
Could you please mark this topic as resolved? This way, other users will be informed that this thread has been resolved.

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.

All Replies
Moderator

Re: [resolved] Customizing error message "For input string"

Hi,
You can use tLogCatcher to catch this error("For input string "ABCD") then customing the information through tMap.

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.
Five Stars

Re: [resolved] Customizing error message "For input string"

Hi Sabrina,
In my case SIMPLE_MAPPING component throws the error. So I cant use tMap to handle it.
Moderator

Re: [resolved] Customizing error message "For input string"

Hi,
Can you create another subjob, such as: tLogCather-->tmap-->output to custom error info?
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.
Five Stars

Re: [resolved] Customizing error message "For input string"

Hi Sabrina,
Yes, I can. But the problem is my 'Die on error' is unchecked and the tLogCatcher will not catch the error. It only prints
"For input String XXXXX" in the console. When I check the 'Die on error' option, the flow stops once an error occurs. But,
I need to continue the flow while skipping the error rows.
Thanks,
thivanka.
Moderator

Re: [resolved] Customizing error message "For input string"

Hi,
I got your point. If so, you can use "Reject" row from tfileinputxxx component which throws the error then contacting to tMap/tjavarow without checking out "Die on error" option.
See my screenshots
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.
One Star

Re: [resolved] Customizing error message "For input string"

Hi asthiwanka,
use the below image component to customize your errors
Five Stars

Re: [resolved] Customizing error message "For input string"

Hi Sabrina,
Thank you for your response. That is the correct way to do it. I will come back to you if I have any issue with that.
Sakhale1990, thanks for your reply too. I will first try Sabrina's solution. Smiley Happy
Thanks,
thivanka.
Moderator

Re: [resolved] Customizing error message "For input string"

Hi,
Feel free to let me know if it is OK with you.
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.
One Star

Re: [resolved] Customizing error message "For input string"

Hi Sabrina,
can u pls solve these Errors
Five Stars

Re: [resolved] Customizing error message "For input string"

Hi Sabrina,
Yes, it works. Thanks a bundle for your support.
Moderator

Re: [resolved] Customizing error message "For input string"

Hi sakhale1990,
Could you please stick to one topic http://www.talendforge.org/forum/viewtopic.php?id=37804 so that we can pay individule attention to it. We are investigating your issue then come back to you asap.
Many thanks
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.
Moderator

Re: [resolved] Customizing error message "For input string"

Hi thivanka,
Could you please mark this topic as resolved? This way, other users will be informed that this thread has been resolved.

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.