> For the complete documentation index, see [llms.txt](https://docs.plumvoice.com/dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plumvoice.com/dev/voicexml/tags/throw-tag.md).

# \<throw>

## \<throw> <a href="#throw" id="throw"></a>

The `<throw>` element throws an event. These can be predefined ones or application-defined events.

### Attributes

<table><thead><tr><th width="146.33333333333331">Name</th><th width="166">Data type<select><option value="dc50233231fd42acb344bf6fdf5630d2" label="String" color="blue"></option><option value="571d47b8d0e44cab9fedc865b6dcd19c" label="Integer" color="blue"></option><option value="179e645ed9b84a47897a7ffbd1031381" label="Boolean" color="blue"></option></select></th><th>Description</th></tr></thead><tbody><tr><td>event</td><td><span data-option="dc50233231fd42acb344bf6fdf5630d2">String</span></td><td>The event being thrown.</td></tr><tr><td>eventexpr</td><td><span data-option="dc50233231fd42acb344bf6fdf5630d2">String</span></td><td>An ECMAScript expression evaluating to the name of the event being thrown.</td></tr><tr><td>message</td><td><span data-option="dc50233231fd42acb344bf6fdf5630d2">String</span></td><td>A message string providing additional context about the event being thrown. The message is available as the value of “_message” within the scope of the catch element.</td></tr><tr><td>messageexpr</td><td><span data-option="dc50233231fd42acb344bf6fdf5630d2">String</span></td><td>An ECMAScript expression evaluating to the message string.</td></tr></tbody></table>

### Notes

Exactly one of “event” and “eventexpr” must be specified. Exactly one of “message” and “messageexpr” may be specified.

### Example

```markup
<?xml version="1.0"?>
<vxml version="2.0">
  <form>
    <block>
      <throw event="myevent" message="hello, world!"/>
    </block>
    <catch event="myevent">
      <prompt>
        Caught my event with the following message:
        <break time="1s"/>
        <value expr="_message"/>
      </prompt>
    </catch>
  </form>
</vxml>
```

The output of the above script would be:

> Computer: Caught my event with the following message:\
> Computer: hello, world!

### Child Tags

None

### Parent Tags

[\<block>](/dev/voicexml/tags/block-tag.md), [\<catch>](/dev/voicexml/tags/catch-tag.md), [\<error>](/dev/voicexml/tags/error-tag.md), [\<filled>](/dev/voicexml/tags/filled-tag.md), [\<foreach>](/dev/voicexml/tags/foreach-tag.md), [\<help>](/dev/voicexml/tags/help-tag.md), [\<if>](/dev/voicexml/tags/if-tag.md), [\<noinput>](/dev/voicexml/tags/noinput-tag.md), [\<nomatch>](/dev/voicexml/tags/nomatch-tag.md)


---

# 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 dynamically by asking a question.

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

```
GET https://docs.plumvoice.com/dev/voicexml/tags/throw-tag.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
