explicit Error(Code code, std::string msg)
接口功能
根据枚举Code,错误信息msg创建返回信息对象。
接口格式
explicit Error(Code code, std::string msg);
接口参数
参数 |
是否必选 |
说明 |
取值要求 |
---|---|---|---|
code |
必选 |
错误码。 |
|
msg |
必选 |
错误信息。 |
合法字符串。 |
使用样例
Error(Error::Code::ERROR, "ERROR: Failed to get real path of home.");
返回值
Error对象。
父主题: Error