StatusCode接口
接口功能
获取状态对象的错误码。
接口格式
Error::Code StatusCode() const;
接口参数
无。
使用样例
获取状态对象的错误码。
1 2 3 4 5 | auto status = inferEngine->ControlRequest(requestId, Operation::STOP); if (status.StatusCode() == Error::Code::OK) { EP_LOG_INFO("stop request id = " << stopReqId << " success."); return HttpResult{ HTTP_STATUS_CODE_OK, reqCtx->MsgBody() }; } |
返回值
错误码枚举。
父主题: Status