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

# arc:throw

> 使用 arc:throw 從指令碼中擲回錯誤（例外），並提供標識程式碼以及可選的描述和詳細資訊。

export const siteNameShort = "知行之橋";

`arc:throw` 關鍵字用於從指令碼中擲回錯誤（例外）。

## 參數

* **code**：用於標識例外來源或含義的字串值。此參數是必需的。
* **desc\[ription]**：可選參數，用於指定描述錯誤條件的簡短訊息。
* **details**：可選參數，包含診斷錯誤時可能有用的附加資訊。

## 控制屬性

無

## 範例

以下範例顯式定義了錯誤碼和描述：

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

## 另請參閱

* [arc:try](./op-arc-try)：定義用於捕獲例外的範圍。
* [arc:catch](./op-arc-catch)：捕獲擲回的例外並定義例外處理。
