---
title: Message接口
description: "获取返回对象内的错误码信息。"
url: https://www.hiascend.com/document/detail/zh/mindie/latest/mindiellm/llmdev/mindie_llm0122.html
sourcePath: /source/zh/mindie/310/mindiellm/llmdev/mindie_llm0122.html
indexId: 52271e5a3495d1ccceec716d7dfa7fe226eec735d1f1787ece50d19bf798d30a58
---
# Message接口

#### 接口功能

获取返回对象内的错误码信息。


#### 接口格式

```
const std::string &Message() const;
```


#### 接口参数

无。


#### 使用样例

构造Error对象，然后获取对象内的错误码信息。

```
Error(Error::Code::ERROR, "ERROR: Failed to get real path of home.").Message();
```


#### 返回值

错误码信息，string类型。
