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

!11693 翻译完成:10672 colorSpaceManager增加错误码描述

Merge pull request !11693 from wusongqing/TR10672
......@@ -64,6 +64,14 @@ Creates a standard color space object.
| ------------------ | ------------------------ |
| [ColorSpaceManager](#colorspacemanager) | Color space object created. |
**Error codes**
For details about the error codes, see [colorSpaceManager Error Codes](../errorcodes/errorcode-colorspace-manager.md).
| ID| Error Message|
| ------- | ----------------------- |
| 18600001 | Parameter value is abnormal. |
**Example**
```js
......@@ -96,6 +104,14 @@ Creates a custom color space object.
| ------------------ | ------------------------ |
| [ColorSpaceManager](#colorspacemanager) | Color space object created.<br>The color space type is **CUSTOM** of [ColorSpace](#colorspace).|
**Error codes**
For details about the error codes, see [colorSpaceManager Error Codes](../errorcodes/errorcode-colorspace-manager.md).
| ID| Error Message|
| ------- | ----------------------- |
| 18600001 | Parameter value is abnormal. |
**Example**
```js
......@@ -138,11 +154,19 @@ Obtains the color space type.
| ------------------ | ------------------------ |
| [ColorSpace](#colorspace) | Color space type.|
**Error codes**
For details about the error codes, see [colorSpaceManager Error Codes](../errorcodes/errorcode-colorspace-manager.md).
| ID| Error Message|
| ------- | ----------------------- |
| 18600001 | Parameter value is abnormal. |
**Example**
```js
try {
let csType = colorSpace.getColorSpaceName();
colorSpace.getColorSpaceName();
} catch (err) {
console.log(`Fail to get colorSpace's name. Cause: ` + JSON.stringify(err));
}
......@@ -162,11 +186,19 @@ Obtains the coordinates of the white point of the color space.
| ------------------ | ------------------------ |
| Array\<number\> | Coordinates [x, y] of the white point.|
**Error codes**
For details about the error codes, see [colorSpaceManager Error Codes](../errorcodes/errorcode-colorspace-manager.md).
| ID| Error Message|
| ------- | ----------------------- |
| 18600001 | Parameter value is abnormal. |
**Example**
```js
try {
let wp = colorSpace.getWhitePoint();
colorSpace.getWhitePoint();
} catch (err) {
console.log(`Failed to get white point. Cause: ` + JSON.stringify(err));
}
......@@ -186,11 +218,19 @@ Obtains the gamma of the color space.
| ------------------ | ------------------------ |
| number | Gamma of the color space.|
**Error codes**
For details about the error codes, see [colorSpaceManager Error Codes](../errorcodes/errorcode-colorspace-manager.md).
| ID| Error Message|
| ------- | ----------------------- |
| 18600001 | Parameter value is abnormal. |
**Example**
```js
try {
let gamma = colorSpace.getGamma();
colorSpace.getGamma();
} catch (err) {
console.log(`Failed to get gamma. Cause: ` + JSON.stringify(err));
}
......
# colorSpaceManager Error Codes
## 18600001 Abnormal Parameter Value
**Error Message**
Parameter value is abnormal.
**Description**
This error code is reported when a parameter value passed in the API does not meet the requirements.
**Possible Causes**
The parameter value exceeds the valid range. For example, an enumerated value exceeds the defined range.
**Solution**
Pass parameter values that meet the requirements in the API.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册