---
title: set_ret_code
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/dataflowdevg/udfrefp_23_0007.html
sourcePath: /source/zh/canncommercial/900/others/dataflowdevg/udfrefp_23_0007.html
indexId: 6c8c21b228fb60601be9820beb38f0d77cb22c3d0e0a01b7a6620c678fa2653c70
---
# set_ret_code

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | x |
| Atlas 推理系列产品 | x |
| Atlas 训练系列产品 | x |


#### 函数功能

设置FlowMsg消息中的错误码。


#### 函数原型

```
set_ret_code(ret_code :  int) -> None
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| retCode | 输入 | 错误返回码。 |


#### 返回值

无


#### 异常处理

无


#### 约束说明

无
