# Exception Handler

<img src="https://processmix.com/wp-content/uploads/2023/01/Property-1Exeption_Hendler.png" alt="" data-size="line"> The exception handler node catches checked exceptions. It starts a new embedded subflow with an input variable that contains details of the exception that was thrown somewhere in the main flow. One such handler is defined per exception type, which allows to handle all related error states correctly and in one centralized place.&#x20;

One flow can contains multiple exception handlers. If flow has more then one handler then the handler that handles raised exception type will be called.

Example:

```
Exception A extends B, which extends pdk.ex.Exception.
Exception C extends pdk.ex.Exception.

The flow has 3 handlers for different types of exceptions.
A. handle A exception
B. handle B exception
E. handle pdk.ex.Exception

Cases:
1. Exception A was raised - handler A was executed.
2. Exception C was raised - handler E was executed (there is no handler for the 
    C structure, but C extends pdk.ex.Exception, which can be handled by E).

```

***

## Properties

### Common Properties

<mark style="color:purple;">**Name**</mark> - refers to the unique identifier or label assigned to a node within a flow.

<table><thead><tr><th width="139">Type</th><th>Restrictions</th></tr></thead><tbody><tr><td>input Text</td><td><ul><li>must consist of letters (A-Z or a-z), digits (0-9), underscores (_), or dollar signs ($). However, a class name cannot start with a digit and dollar sign ($)</li><li>Unique per flow</li><li>Mandatory</li><li>Min length: 1</li><li>Max length: 255</li><li><a href="../../../appendix/reserved-words">Reserved words</a></li></ul></td></tr></tbody></table>

<mark style="color:purple;">**Description**</mark> - provides a textual description or additional information about a  node within a flow. Unlike the name property, which serves as a unique identifier or label for the node, the description property offers supplementary details that help to clarify the purpose, functionality, or behavior of the node.

<table><thead><tr><th width="144">Type</th><th>Restrictions</th></tr></thead><tbody><tr><td>Input Text</td><td><ul><li>Max length: 5000</li></ul></td></tr></tbody></table>

### Exception Handler-Specific Properties

Multiple conditions are allowed to be added.

Each condition contains two settings:

<mark style="color:purple;">**Exception**</mark> - exception type or its children to be handled.

<table><thead><tr><th width="144">Type</th><th>Restrictions</th></tr></thead><tbody><tr><td><a href="../../exceptions/checked-exceptions">Exception</a></td><td><ul><li>Mandatory</li></ul></td></tr></tbody></table>

***

## Result

A new variable with the exception type defined as an input parameter.

***

## Connections

This node has no incoming and one outgoing connection

| Type | Min count | Max count |
| ---- | --------- | --------- |
| in   | 0         | 0         |
| out  | 1         | 1         |

