# Handling errors

This scenario applies only to Talend Data Management Platform, Talend Big Data Platform, Talend Real Time Big Data Platform, Talend Data Services Platform, Talend MDM Platform and Talend Data Fabric.

For more technologies supported by Talend, see [Talend components](https://help.qlik.com/talend/r/en-US/7.3/components/data-mapping).

This following scenario creates a six-component Job that shows how to handle error conditions using the tHMap component.

When tHMap executes a Talend Data Mapper map, an ExecutionStatus object is always returned. A pointer to this object is stored in the globalMap as &lt;tHMap\_id&gt;\_EXECUTION\_STATUS. In addition, the Overall Severity numeric value is also stored in the globalMap as &lt;tHMap\_id&gt;\_EXECUTION\_SEVERITY.

Finally, a parameter called Exception Threshold is defined that specifies the severity on which to throw an exception, thus triggering Job-related or component-related error processing. This value can be defined in the tHMap properties, in the Advanced settings tab. The default value for this parameter is Fatal.

You can use the following functions in org.talend.transform.runtime.common.MapExecutionStatus to get information about your map execution:

* getOverallSeverity(): returns the numeric value of the highest severity level.
  * INFO is returned as 1
  * WARN is returned as 2
  * ERROR is returned as 4
  * FATAL is returned as 0x40
* isOK(): returns true if there is no warning, error or fatal status.
* exportToXml(writer): writes the status items in XML format.

![](https://help.qlik.com/talend/en-US/components/7.3/Resources/images/use_case-thmap-scenario_error_handling.png)

### In this section

* [Adding and linking the components](https://help.qlik.com/talend/en-US/components/7.3/data-mapping/thmap-tjava-tfixedflowinput-tjavarow-adding-and-linking-components-standard-component-enterprise-in)
* [Defining the properties of the RunIf trigger](https://help.qlik.com/talend/en-US/components/7.3/data-mapping/thmap-tjava-tfixedflowinput-tjavarow-defining-properties-of-runif-trigger-standard-component-enterprise-select)
* [Defining the properties of tFixedFlowInput](https://help.qlik.com/talend/en-US/components/7.3/data-mapping/thmap-tjava-tfixedflowinput-tjavarow-defining-properties-of-tfixedflowinput-standard-component-enterprise-select)
* [Defining the properties of tJavaRow](https://help.qlik.com/talend/en-US/components/7.3/data-mapping/thmap-tjava-tfixedflowinput-tjavarow-defining-properties-of-tjavarow-standard-component-enterprise-select)
* [Defining the properties of tHMap](https://help.qlik.com/talend/en-US/components/7.3/data-mapping/thmap-tjava-tfixedflowinput-tjavarow-defining-properties-of-thmap-standard-component-enterprise-select)
* [Defining the properties of the first tJava component (OnSubjobError)](https://help.qlik.com/talend/en-US/components/7.3/data-mapping/thmap-tjava-tfixedflowinput-tjavarow-defining-properties-of-first-tjava-component-onsubjoberror-standard-component-enterprise-select)
* [Defining the properties of the second tJava component (OnSubjobOk)](https://help.qlik.com/talend/en-US/components/7.3/data-mapping/thmap-tjava-tfixedflowinput-tjavarow-defining-properties-of-second-tjava-component-onsubjobok-standard-component-enterprise-select)
* [Defining the properties of the third tJava component (RunIf)](https://help.qlik.com/talend/en-US/components/7.3/data-mapping/thmap-tjava-tfixedflowinput-tjavarow-defining-properties-of-third-tjava-component-runif-standard-component-enterprise-select)
* [Running the Job under different conditions](https://help.qlik.com/talend/en-US/components/7.3/data-mapping/thmap-tjava-tfixedflowinput-tjavarow-running-job-under-different-conditions-standard-component-enterprise-press)

**Related concepts**

[tHMap](https://help.qlik.com/talend/en-US/components/7.3/data-mapping/thmap "Executes transformations (called maps) between different sources and destinations by harnessing the capabilities of Talend Data Mapper , available in the Mapping perspective.")

**Related information**

[tFixedFlowInput](https://help.qlik.com/talend/r/en-US/7.3/components/tfixedflowinput/tfixedflowinput)

[tJava](https://help.qlik.com/talend/r/en-US/7.3/components/java-custom-code/tjava)

[tJavaRow](https://help.qlik.com/talend/r/en-US/7.3/components/java-custom-code/tjavarow)