下载
中文
注册

ToString接口

接口功能

将返回对象转为字符串格式,具体为错误码映射为相应字符后,和错误信息以": "进行拼接。

接口格式

std::string ToString() const;

接口参数

无。

使用样例

auto err = input->Allocate(totalSize * sizeof(int64_t));
err.ToString();

返回值

返回对象转化出来的字符串。

Error对象

返回字符格式

Error::Code::OK

OK: + msg

Error::Code::ERROR

Error: +msg

Error::Code::INVALID_ARG

Invalid argument: +msg

Error::Code::NOT_FOUND

Not found: +msg