tLogCatcher is not catching cannot find the file specified exception

Five Stars

tLogCatcher is not catching cannot find the file specified exception

Hi
i have developed a small job which has project level Logs & stat enable for all types of errors, exceptions and stats.
so my job has two component tFileInputDelimited and tLogRow
in tFileInputDelimited i have provided wrong file name so exception should raise. and tlog to just make connection of main connector(as such no use of it)
and my project level property i have set the log records in file.
i executed job it thrown error message on console that is "The system cannot find the file specified" start with file name with path.
But when i goes to log directory to see the log file, there was no file created, only "stats_file.txt" is created and it showing status as success.
please suggest is it bug or i missed some thing.
Employee

Re: tLogCatcher is not catching cannot find the file specified exception

can i get a screenshot of your configuration for stat&log on your job please?
Seven Stars

Re: tLogCatcher is not catching cannot find the file specified exception

Make sure tFileInputDelimited has "Die on error" checked.
Five Stars

Re: tLogCatcher is not catching cannot find the file specified exception

sorry for late reply
@erairat we have set all the configuration well, using component guide and forum post. if configuration was the problem then it should be cause for both error not for only error.
@alevy
i don`t want to die the job, let it run even it got the error.
same thing is applicable for this also if i did`t activate "Die on error" then it should not capture error for second scenario.
please suggest.
One Star

Re: tLogCatcher is not catching cannot find the file specified exception

Hi,
Can you please explain what type of errors are you trying to catch through the tLogCatcher? since if the errors are deta related you can simply use OnError flow. If they are design time errors then probably you don't even have to bother as system shows Error and Warning symbols on the components. Another type of error may be system or any runtime error, so for them what option have been enabled.
So a screenshot would help to understand the scenario better, then our friends would surely be able to help you.
--
Regards,
Vinod
Five Stars

Re: tLogCatcher is not catching cannot find the file specified exception

Here is the configuration.
One Star

Re: tLogCatcher is not catching cannot find the file specified exception

As alevy suggested you'll have to use 'tDie' option. Do you have any other use case in mind so that we can validate scenario against the components and available logging options.
Five Stars

Re: tLogCatcher is not catching cannot find the file specified exception

sorry but i don`t want to use tDie. because it will be die any way. My concern is to catch the exception.
Here is the use case: create a same job and keep one column as Numeric then pass a null value to that column using variable see it will catch Null-pointer Exception. without using tDie. but not catching file not found exception.
Five Stars

Re: tLogCatcher is not catching cannot find the file specified exception

any update
Seven Stars

Re: tLogCatcher is not catching cannot find the file specified exception

tLogCatcher will only catch Java exceptions that are not handled by the component code.
If you don't check "Die on error", the exception IS handled by the component code so tLogCatcher will not be triggered.
Note that tLogCatcher will capture errors that you handle with OnComponentError or OnSubjobError (after processing those steps).
I don't understand why you don't want the job to die; what do you expect it to do if tFileInputDelimited cannot find the file?