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

# Raise

## 指令说明

**描述：** 主动抛出自定义异常，终止当前执行路径并交由对应的异常处理流程处理。

## 参数说明

<Tabs>
  <Tab title="常规">
    <img src="https://mintcdn.com/bazhuayu-rpa-docs/v_rTeoLOdoPnGE6I/helpcenter/commands/others/images/raisecommand-02.png?fit=max&auto=format&n=v_rTeoLOdoPnGE6I&q=85&s=44848084395c8c45e22629817aa0d490" alt="Raise指令参数面板" width="655" height="250" data-path="helpcenter/commands/others/images/raisecommand-02.png" />

    | 参数       | 说明                       |
    | -------- | ------------------------ |
    | **异常原因** | 填写异常的原因，自定义异常内容，也可以调用参数。 |
  </Tab>

  <Tab title="高级">
    本指令暂无高级参数。
  </Tab>
</Tabs>

## 使用示例

<img src="https://mintcdn.com/bazhuayu-rpa-docs/v_rTeoLOdoPnGE6I/helpcenter/commands/others/images/raisecommand-01.png?fit=max&auto=format&n=v_rTeoLOdoPnGE6I&q=85&s=53c254d980068dad169e3e2f64bc8bfd" alt="Raise使用示例" width="834" height="697" data-path="helpcenter/commands/others/images/raisecommand-01.png" />

<img src="https://mintcdn.com/bazhuayu-rpa-docs/v_rTeoLOdoPnGE6I/helpcenter/commands/others/images/raisecommand-03.png?fit=max&auto=format&n=v_rTeoLOdoPnGE6I&q=85&s=d08ceacd5bb2a6bc679e59b38f6262a8" alt="Raise使用示例" width="838" height="711" data-path="helpcenter/commands/others/images/raisecommand-03.png" />

**该流程执行逻辑：**

1. 在【Try】中执行可能失败的业务指令，例如【设置变量】和【打印日志】。
2. 在【Catch】中捕获异常，并将错误详情保存到变量“错误信息”。
3. 执行【Raise】重新抛出“错误信息”，终止当前流程并把本次运行标记为失败，便于定时任务的负责人发现异常。

如果 Catch 中不执行 Raise，异常会被捕获，任务可能仍显示成功；两种方式应根据是否需要上报失败来选择。

### 效果展示

<img src="https://mintcdn.com/bazhuayu-rpa-docs/v_rTeoLOdoPnGE6I/helpcenter/commands/others/images/raisecommand-04.png?fit=max&auto=format&n=v_rTeoLOdoPnGE6I&q=85&s=28a74855922097a6d978eb4451509470" alt="Raise效果展示" width="1246" height="364" data-path="helpcenter/commands/others/images/raisecommand-04.png" />

<Info>
  使用指令过程中遇到问题？前往 [八爪鱼RPA 开发者社区问答板块](https://rpa.bazhuayu.com/community/questions) 提问，获取官方与社区帮助。
</Info>
