> For the complete documentation index, see [llms.txt](https://docs.gpmautomate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpmautomate.com/automate-en/action-guide/workflow/throw-is-already-an-english-word.md).

# Throw

Throw is an action used to actively throw an error message (Exception) that you define and immediately stop the current script flow.

The core difference between Throw and Stop lies in the reporting status after stopping the flow:

* Stop: Stops the flow and the system still records the running status as completed (Completed - displayed in green).
* Throw: Stops the flow and the system will mark the status as encountered an error (Error - highlighted in red) along with the specific error message in the system log (Log).

#### Real-world example: Throwing an error when the advertising account balance is depleted

Suppose you are scripting an automation for an advertising campaign. Before setting it up, the script needs to go to the management page to check the budget. If the balance is 0, the script cannot continue:

* Configuration method:
  * Use an If block to check: `If balance = 0`.
  * Inside the If block, you call the Throw action and fill in the error message as: `"Error: Account out of funds, cannot create camp!"`.
* Result: When it reaches this point, the flow of this profile will immediately close. On the progress management board of GPM Automate, that profile line will be switched to Error status (Highlighted in red) along with the error message. You can quickly glance through the list to filter out which accounts are encountering errors for processing without mixing them up with successfully running flows (Completed).

<figure><img src="https://2961903581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpIRrmOLZkhHBXdAiidIw%2Fuploads%2Fgit-blob-9de95c89fbc59dc4cd28dada4d797825306b8976%2Fwf-03.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2961903581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpIRrmOLZkhHBXdAiidIw%2Fuploads%2Fgit-blob-4e0a209029f97ac07d177ea7f9723e40b3c42d68%2Fwf-03b.png?alt=media" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.gpmautomate.com/automate-en/action-guide/workflow/throw-is-already-an-english-word.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
