# Throw Exception

**Introduction**&#x20;

This step is designed to intentionally stop the execution of the current path in an automation and log an exception message.

**Description**&#x20;

Useful for handling error conditions or specific scenarios where the automation should not proceed further. When executed, this step halts the current path and records the specified exception message.

**Configuration**

* **Message**: Enter the exception message to be logged when this step is executed. This message helps you to identify the reason for halting the automation. The maximum length for the message is 1000 characters.

**Usage**&#x20;

Ideal for error handling in automations, allowing for controlled termination of a path under certain conditions, and providing a clear message for debugging or audit purposes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flexy.bot/modules/scripting/steps/throw-exception.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
