# tAssertCatcher

Generates a data flow consolidating the status information of a job execution and transfer the data into defined output files.

Based on its pre-defined schema, tAssertCatcher fetches the execution status information from repository, Job execution and tAssert.

## tAssertCatcher Standard properties

These properties are used to configure tAssertCatcher running in the Standard Job framework.

The Standard tAssertCatcher component belongs to the Logs & Errors family.

The component in this framework is available in all Talend products.

## Basic settings

| Properties | Description |
| --- | --- |
| Schema and Edit<br>schema | <ul> <li> <p>A schema is a row description, it defines the fields to be                                processed and passed on to the next component. In this particular                                case, the schema is read-only, as this component gathers standard                                log information including:</p> </li> <li> <p> <span>Moment</span>: Processing time and                                date.</p> </li> <li> <p> <span>Pid</span>: Process ID.</p> </li> <li> <p> <span>Project</span>: Project which the job                                belongs to.</p> </li> <li> <p> <span>Job</span>: Job name.</p> </li> <li> <p> <span>Language:</span> Language used by the                                Job (Java)</p> </li> <li> <p> <span>Origin</span>: Status evaluation origin.                                The origin may be different <span>tAssert</span>                                components.</p> </li> <li> <p> <span>Status</span>: Evaluation fetched                                    from<span> tAssert</span>. They may                                be</p> <p> - <span>Ok</span>: if the assertive statement                                of <span>tAssert</span> is evaluated as true at                                runtime.</p> <p> - <span>Failed</span>: if the assertive                                statement of <span>tAssert</span> is evaluated                                as false or an execution error occurs at runtime. The tested Job's                                result does not match the expectation or an execution error occured                                at runtime.</p> </li> <li> <p> <span>Substatus</span>: Detailed explanation                                for failed execution. The explanation can be:</p> <p> - <span>Test logically failed</span>: the                                investigated Job does not produce the expected result.</p> <p> - <span>Execution error</span>: an execution                                error occurred at runtime.</p> </li> <li> <p> <span>Description</span>: Descriptive message                                typed in <span>Basic settings</span> of                                    <span>tAssert</span> (when <span>Catch tAssert</span> is selected) and/or the                                message of the exception captured (when <span>Catch                                    Java Exception</span> is selected).</p> </li> <li> <p> <span>Exception</span>: The Exception object                                thrown by the Job, namely the original exception.</p> <p>Available when <span>Get original                                    exception</span> is selected.</p> </li> </ul> |
| Catch Java Exception | This check box allows to capture Java exception errors and show<br>the message in the Description<br>column (Get original exception not<br>selected) or in the Exception<br>column (Get original exception<br>selected) column, once checked. |
| Get original exception | This check box allows to show the original exception object in the<br>Exception column, once<br>checked.<br><br>Available when Catch Java<br>Exception is selected. |
| Catch tAssert | This check box allows to capture the evaluations of tAssert. |

## Global Variables

| Variables | Description |
| --- | --- |
| Global Variables | ERROR\_MESSAGE: the error message generated by the<br>component when an error occurs. This is an After variable and it returns a string. This<br>variable functions only if the Die on error checkbox is<br>cleared, if the component has this checkbox.<br><br>A Flow variable functions during the execution of a component<br>while an After variable functions after the execution of the component.<br><br>To fill up a field or expression with a variable, press Ctrl+Space to access the variable list and choose the variable to use from<br>it.<br><br>For more information about variables, see [Using contexts and variables](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/contexts-and-variables). |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | This component is the start component of a secondary Job which<br>fetches the execution status information from several sources. It<br>generates a data flow to transfer the information to the component<br>which proceeds. |
| Limitation | This component must be used with tAssert together. |

**Related concepts**

* [Setting up the assertive condition for a Job execution](https://help.qlik.com/talend/en-US/components/8.0/logs-and-errors/tassert-tassertcatcher-tfileoutputdelimited-setting-up-assertive-condition-for-job-execution-standard-component-this)
* [Viewing product orders status (on a daily basis) against a benchmark number](https://help.qlik.com/talend/en-US/components/8.0/logs-and-errors/tassert-tlogrow-tmysqloutput-viewing-product-orders-status-on-daily-basis-against-benchmark-number-standard-component-this)