<?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 Re: Does using OnComponentError prevent an error from being thrown? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Does-using-OnComponentError-prevent-an-error-from-being-thrown/m-p/2209631#M8378</link>
    <description>&lt;P&gt;a tJava component with something like this in it should do it for you. You'll need to double check the globalMap key's your components or jobs populate to make sure you get the right error messages.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;throw new RuntimeException(((String)globalMap.get("&amp;lt;component_id&amp;gt;_ERROR_MESSAGE")));&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;depending on how your job is connected, you may need to wrap the throw statement in an "if" to prevent the unreachable code compile error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;if( true ) {&amp;nbsp;

&amp;nbsp; &amp;nbsp; //throw exceptions

}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Oct 2018 18:28:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-10-29T18:28:31Z</dc:date>
    <item>
      <title>Does using OnComponentError prevent an error from being thrown?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Does-using-OnComponentError-prevent-an-error-from-being-thrown/m-p/2209628#M8375</link>
      <description>&lt;P&gt;In my main job, I have OnComponentError routed to tDie components in a few places. I also have a&amp;nbsp;joblet set up to listen to Java Exceptions via the tLogCatcher. The joblet handles emailing, logging, and also has a tDie component at the end of it so the job completely ends on exception. My question is, if I have OnComponentError coming off a particular component, and that component fails, will it still throw an Exception for my joblet to catch or will it go to the tDie component and not hit my joblet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My desired behavior is for all exceptions/errors to trigger the joblet so that errors get logged and emails triggered. I'm wondering if I need to avoid using "OnComponentError" flows altogether then or not.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 17:52:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Does-using-OnComponentError-prevent-an-error-from-being-thrown/m-p/2209628#M8375</guid>
      <dc:creator>nickheidke</dc:creator>
      <dc:date>2018-10-29T17:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Does using OnComponentError prevent an error from being thrown?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Does-using-OnComponentError-prevent-an-error-from-being-thrown/m-p/2209629#M8376</link>
      <description>if you take a peek at the generated java you can see that onComponentError links create try/catch blocks that will trap errors in the component. Unless you re-throw the exception after the onComponentError link, the tLogCatcher component will not see the errors</description>
      <pubDate>Mon, 29 Oct 2018 17:58:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Does-using-OnComponentError-prevent-an-error-from-being-thrown/m-p/2209629#M8376</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-29T17:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Does using OnComponentError prevent an error from being thrown?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Does-using-OnComponentError-prevent-an-error-from-being-thrown/m-p/2209630#M8377</link>
      <description>&lt;P&gt;That's super helpful, thank you!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I wanted to re-throw the error, which component would I use to do that?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 18:06:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Does-using-OnComponentError-prevent-an-error-from-being-thrown/m-p/2209630#M8377</guid>
      <dc:creator>nickheidke</dc:creator>
      <dc:date>2018-10-29T18:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Does using OnComponentError prevent an error from being thrown?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Does-using-OnComponentError-prevent-an-error-from-being-thrown/m-p/2209631#M8378</link>
      <description>&lt;P&gt;a tJava component with something like this in it should do it for you. You'll need to double check the globalMap key's your components or jobs populate to make sure you get the right error messages.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;throw new RuntimeException(((String)globalMap.get("&amp;lt;component_id&amp;gt;_ERROR_MESSAGE")));&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;depending on how your job is connected, you may need to wrap the throw statement in an "if" to prevent the unreachable code compile error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;if( true ) {&amp;nbsp;

&amp;nbsp; &amp;nbsp; //throw exceptions

}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 18:28:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Does-using-OnComponentError-prevent-an-error-from-being-thrown/m-p/2209631#M8378</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-29T18:28:31Z</dc:date>
    </item>
  </channel>
</rss>

