根据枚举Code,错误信息msg创建返回信息对象。
explicit Error(Code code, std::string msg)
参数
是否必选
说明
取值要求
code
必选
错误码。
msg
错误信息。
合法字符串。
Error(Error::Code::ERROR, "ERROR: Failed to get real path of home.");
Error对象。