# Switch/Case

The switch operator compares an expression with specified values and exits through the specified connector. If no matches are found, it exits through the "Default" connector.

<table data-header-hidden><thead><tr><th width="234" valign="top"></th><th width="325" valign="top"></th></tr></thead><tbody><tr><td valign="top">Expression</td><td valign="top">[Any type] The expression to compare.</td></tr><tr><td valign="top">Condition 1</td><td valign="top"><p>[Any type] Condition 1. If matched, it will exit through connector 1, and expression 1 will be executed if specified.</p><p>If the connector is not specified, it will exit by default.</p></td></tr><tr><td valign="top">Execute expression 1</td><td valign="top"><p>[Expression] If condition 1 is met, this expression will be executed and it will exit through the corresponding connector.</p><p>If the connector is not connected, it will exit by default.</p></td></tr><tr><td valign="top">Condition 2</td><td valign="top"><p>[Any type] Condition 2. If matched, it will exit through connector 2, and expression 2 will be executed if specified.</p><p>If the connector is not specified, it will exit by default.</p></td></tr><tr><td valign="top">Execute expression 2</td><td valign="top"><p>[Expression] If condition 2 is met, this expression will be executed and it will exit through the corresponding connector.</p><p>If the connector is not connected, it will exit by default.</p></td></tr><tr><td valign="top">Condition 3</td><td valign="top"><p>[Any type] Condition 3. If matched, it will exit through connector 3, and expression 3 will be executed if specified.</p><p>If the connector is not specified, it will exit by default.</p></td></tr><tr><td valign="top">Execute expression 3</td><td valign="top"><p>[Expression] If condition 3 is met, this expression will be executed and it will exit through the corresponding connector.</p><p>If the connector is not connected, it will exit by default.</p></td></tr><tr><td valign="top">Condition 4</td><td valign="top"><p>[Any type] Condition 4. If matched, it will exit through connector 4, and expression 4 will be executed if specified.</p><p>If the connector is not specified, it will exit by default.</p></td></tr><tr><td valign="top">Execute expression 4</td><td valign="top"><p>[Expression] If condition 4 is met, this expression will be executed and it will exit through the corresponding connector.</p><p>If the connector is not connected, it will exit by default.</p></td></tr><tr><td valign="top">Condition 5</td><td valign="top"><p>[Any type] Condition 5. If matched, it will exit through connector 5, and expression 5 will be executed if specified.</p><p>If the connector is not specified, it will exit by default.</p></td></tr><tr><td valign="top">Execute expression 5</td><td valign="top"><p>[Expression] If condition 5 is met, this expression will be executed and it will exit through the corresponding connector.</p><p>If the connector is not connected, it will exit by default.</p></td></tr><tr><td valign="top">Execute default expression</td><td valign="top">[Expression] If none of the conditions are met, this expression will be executed.</td></tr><tr><td valign="top">Error handling level</td><td valign="top"><p>Select the error handling level. Possible values:</p><ul><li>"Default" - by default;</li><li>"Ignore" - errors are ignored;</li><li>"Handle" - errors are handled.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Exit direction</td><td valign="top"><p>Select the exit direction from the block when an error occurs. Possible values:</p><ul><li>"Default" - by default;</li><li>"Right" - to the right;</li><li>"Bottom" - down.</li></ul><p>This property allows you to determine the exit direction when errors occur for blocks that do not contain the "If error" connector (for example, the "Condition" block).</p><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Message level</td><td valign="top"><p>Select the message level that the blocks will output during operation. Possible values:</p><ul><li>"Default" - by default;</li><li>"Release" - output is disabled;</li><li>"Debug" - main information output;</li><li>"Detailed" - detailed information output.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Error text</td><td valign="top">[Text] Returns detailed information about the error in case of incorrect execution of the block.</td></tr></tbody></table>
