---
title: StatusCode接口
description: "获取状态对象的错误码。"
url: https://www.hiascend.com/document/detail/zh/mindie/latest/mindiellm/llmdev/mindie_llm0138.html
sourcePath: /source/zh/mindie/310/mindiellm/llmdev/mindie_llm0138.html
indexId: 94d8024be330ff65b8f4235a7188643cd4f592a23762ecfd7b8396dfbda7b6f158
---
# StatusCode接口

#### 接口功能

获取状态对象的错误码。


#### 接口格式

```
Error::Code StatusCode() const;
```


#### 接口参数

无。


#### 使用样例

创建一个Status对象，然后获取状态对象的错误码。

```
auto status = Status(Error::Code::ERROR, "Engine init model failed: new modelBackend failed");
auto code = status.StatusCode();
```


#### 返回值

错误码枚举。
