未验证 提交 a1af0e09 编写于 作者: O openharmony_ci 提交者: Gitee

!10980 翻译完成:10512 添加泛sensor模块错误码信息

Merge pull request !10980 from wusongqing/TR10512
......@@ -31,6 +31,14 @@ Triggers vibration with the specified effect and attribute. This API uses a prom
| attribute | [VibrateAttribute](#vibrateattribute9) | Yes | Vibration attribute. |
| callback | AsyncCallback<void> | Yes | Callback used to the result. If the vibration starts, **err** is **undefined**. Otherwise, **err** is an error object.|
**Error codes**
For details about the error codes, see [Vibrator Error Codes](../errorcodes/errorcode-vibrator.md).
| ID| Error Message |
| -------- | ------------------------- |
| 14600101 | Device operation failed.|
**Example**
```js
......@@ -76,6 +84,14 @@ Triggers vibration with the specified effect and attribute. This API uses a prom
| ------------------- | -------------------------------------- |
| Promise<void> | Promise that returns no value.|
**Error codes**
For details about the error codes, see [Vibrator Error Codes](../errorcodes/errorcode-vibrator.md).
| ID| Error Message |
| -------- | ------------------------- |
| 14600101 | Device operation failed.|
**Example**
```js
......
# Sensor Error Codes
## 14500101 Service exception.
**Error Message**
Service exception.
**Description**
This error code is reported if the HDI service is abnormal when the **on**, **once**, or **off** interface of the sensor module is called.
**Possible Causes**
The HDI service is abnormal.
**Procedure**
1. Retry the operation at a specified interval (for example, 1s) or at an exponential increase interval.
2. If the operation fails for three consecutive times, stop the retry. You can also attempt to obtain the sensor list to check for device availability.
# Vibrator Error Codes
## 14600101 Device operation failed.
**Error Message**
Device operation failed.
**Description**
This error code is reported if the HDI service is abnormal or the device is occupied when the **startVibration** interface of the vibrator module is called.
**Possible Causes**
1. The HDI service is abnormal.
2. The device is occupied.
**Procedure**
1. Retry the operation at a specified interval or at an exponential increase interval. If the operation fails for three consecutive times, stop the retry. You can also obtain the vibrator list to check for device availability.
2. Set a higher priority for the vibrator.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册