<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Catch an exception caused by a subjob in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Catch-an-exception-caused-by-a-subjob/m-p/2281877#M56267</link>
    <description>&lt;P&gt;Hi everyone.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a situation when one of the subjobs causes a random exception caused by remote server. This specific exception is non-critical and what I'd like to do is to check the exception type and continue if it's the non-critical one. I. e. in Java i'd do it in the following way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;//Run the subjob here&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;catch (exception e)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;if (!(e is MyNonCriticalException)) throw;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I achieve something like that using Talend components?&lt;/P&gt;
&lt;P&gt;I know that tRunJob has "Die on child error" option. If I check it the main job crashes on child crash. If I uncheck it, the OnComponentError event is not triggered and I cannot check the exception type. Any suggestions?&lt;/P&gt;</description>
    <pubDate>Mon, 03 Feb 2020 16:38:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-02-03T16:38:04Z</dc:date>
    <item>
      <title>Catch an exception caused by a subjob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Catch-an-exception-caused-by-a-subjob/m-p/2281877#M56267</link>
      <description>&lt;P&gt;Hi everyone.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a situation when one of the subjobs causes a random exception caused by remote server. This specific exception is non-critical and what I'd like to do is to check the exception type and continue if it's the non-critical one. I. e. in Java i'd do it in the following way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;//Run the subjob here&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;catch (exception e)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;if (!(e is MyNonCriticalException)) throw;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I achieve something like that using Talend components?&lt;/P&gt;
&lt;P&gt;I know that tRunJob has "Die on child error" option. If I check it the main job crashes on child crash. If I uncheck it, the OnComponentError event is not triggered and I cannot check the exception type. Any suggestions?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 16:38:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Catch-an-exception-caused-by-a-subjob/m-p/2281877#M56267</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-03T16:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Catch an exception caused by a subjob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Catch-an-exception-caused-by-a-subjob/m-p/2281878#M56268</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You can use a tLogCatcher and a tBufferOutput to catch your error and ride it up to the father job.&lt;/P&gt; 
&lt;P&gt;You can inspire from this example :&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="logcatcher.PNG" style="width: 565px;"&gt;&lt;IMG src="https://yutwg22796.i.lithium.com/t5/image/serverpage/image-id/24762i6DDC30BA402267A7/image-size/large?v=1.0&amp;amp;px=999" title="logcatcher.PNG" alt="logcatcher.PNG" /&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="logcatchertmap1.PNG" style="width: 999px;"&gt;&lt;IMG src="https://yutwg22796.i.lithium.com/t5/image/serverpage/image-id/24763i54E3302078EBC331/image-size/large?v=1.0&amp;amp;px=999" title="logcatchertmap1.PNG" alt="logcatchertmap1.PNG" /&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;In this example i want to ride up the NumberFormatException errors from the component tMap_1.&lt;/P&gt; 
&lt;P&gt;On your father job, read your errors like this :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ftherjoblogcatcher.PNG" style="width: 286px;"&gt;&lt;IMG src="https://yutwg22796.i.lithium.com/t5/image/serverpage/image-id/24764iF033462C7C65185F/image-size/large?v=1.0&amp;amp;px=999" title="ftherjoblogcatcher.PNG" alt="ftherjoblogcatcher.PNG" /&gt;&lt;/SPAN&gt;Use the same schema in this link as the tbufferoutputschema&lt;/P&gt; 
&lt;PRE&gt;.-------------------+--------+-------+--------------+------+------------------------------------.
|                                      __UNIQUE_NAME__&amp;lt;br&amp;gt;                                      |
|=------------------+--------+-------+--------------+------+-----------------------------------=|
|moment             |project |job    |type          |origin|message                             |
|=------------------+--------+-------+--------------+------+-----------------------------------=|
|2020-02-03 17:56:05|PROJECT |testt  |Java Exception|tMap_1|java.lang.NumberFormatException:null|
'-------------------+--------+-------+--------------+------+------------------------------------'&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 16:59:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Catch-an-exception-caused-by-a-subjob/m-p/2281878#M56268</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-03T16:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Catch an exception caused by a subjob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Catch-an-exception-caused-by-a-subjob/m-p/2281879#M56269</link>
      <description>&lt;P&gt;Thank you for your reply, that's almost exactly what I needed. I'll use tJavaFlex to analyze the returned error instead of tLogRow and that'll do it.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 17:13:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Catch-an-exception-caused-by-a-subjob/m-p/2281879#M56269</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-03T17:13:07Z</dc:date>
    </item>
  </channel>
</rss>

