Obtaining an Error Message
GetErrorMessage
API Description
This API is used to obtain an error message.
Precautions
- This API is a synchronous API. The return value only indicates whether the API is successfully called.
Method Definition
1 | HWM_SDK_AGENT_API hwmsdk::HwmErrCode GetErrorMessage(int errorCode, OUT HwmErrorMessageInfo *errorMessageInfo); |
Parameter Description
| Parameter | Type | Description |
|---|---|---|
| errorCode | int | Error code. |
| Parameter | Type | Description |
|---|---|---|
| errorMessage | char[] | Error message. UTF-8 encoding is required. |
| Type | Description |
|---|---|
| HwmErrCode | If 0 is returned, the operation is successful. If other values are returned, the operation fails. For details about values returned upon failures, see Common Error Codes. |
| HwmErrorMessageInfo | Error message. |
Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 13 | /** * Obtain an error message. */ void demoGetErrorMessageDlg::OnBnClickedOk() { hwmsdkagent::HwmErrorMessageInfo info{}; int ret = hwmsdkagent::GetErrorMessage(hwmsdk::HWM_AGENT_ERR_IN_PROCESS, &info); if (hwmsdk::HWM_COMMON_SUCCESS != ret) { AfxMessageBox(_T("get error message error")); return; } } |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot