> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# arc:throw

> Use arc:throw to raise an error (exception) from within a script, with an identifying code and optional description and details.

export const siteNameShort = "Arc";

Use the `arc:throw` keyword to raise an error (exception) from within a script.

## Parameters

* **code**: A string value used to identify the source or meaning of the exception. This parameter is required.
* **desc\[ription]**: An optional parameter that specifies a short message describing the error condition.
* **details**: An optional parameter that includes additional information that can be useful when diagnosing the error.

## Control Attributes

None

## Example

This example explicitly defines both an error code and description:

```xml theme={null}
<arc:throw code="myerror" desc="thedescription" />
```

## See Also

* [arc:try](./op-arc-try): Define a scope for catching exceptions.
* [arc:catch](./op-arc-catch): Catch thrown exceptions and define exception processing.
