diff --git a/en/application-dev/reference/apis/js-apis-colorSpaceManager.md b/en/application-dev/reference/apis/js-apis-colorSpaceManager.md index ca879b489145b7d741cdf990e36656b78cd3033b..044fab3c6456d47e9a342b78770f10dc8f58c87d 100644 --- a/en/application-dev/reference/apis/js-apis-colorSpaceManager.md +++ b/en/application-dev/reference/apis/js-apis-colorSpaceManager.md @@ -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.
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\ | 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)); } diff --git a/en/application-dev/reference/errorcodes/errorcode-colorspace-manager.md b/en/application-dev/reference/errorcodes/errorcode-colorspace-manager.md new file mode 100644 index 0000000000000000000000000000000000000000..c2afdd192f26f11593f0a8c6a72f4586c523071e --- /dev/null +++ b/en/application-dev/reference/errorcodes/errorcode-colorspace-manager.md @@ -0,0 +1,18 @@ +# 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.