diff --git a/zh-cn/application-dev/media/image-encoding.md b/zh-cn/application-dev/media/image-encoding.md index 03e72bb7c889ee69d9173ec01e2a59d1f0772da5..7f05b962eef09a2d7b7645da463b92681c428a31 100644 --- a/zh-cn/application-dev/media/image-encoding.md +++ b/zh-cn/application-dev/media/image-encoding.md @@ -32,7 +32,7 @@ ```ts imagePackerApi.packing(pixelMap, packOpts).then( (data : ArrayBuffer) => { // data 为打包获取到的文件流,写入文件保存即可得到一张图片 - }).catch(error => { + }).catch((error : BusinessError) => { console.error('Failed to pack the image. And the error is: ' + error); }) ``` @@ -42,7 +42,7 @@ ```ts imagePackerApi.packing(imageSource, packOpts).then( (data : ArrayBuffer) => { // data 为打包获取到的文件流,写入文件保存即可得到一张图片 - }).catch(error => { + }).catch((error : BusinessError) => { console.error('Failed to pack the image. And the error is: ' + error); }) ```