diff --git a/zh-cn/application-dev/basic-services/usb/usbSerial/usbSerial-overview.md b/zh-cn/application-dev/basic-services/usb/usbSerial/usbSerial-overview.md index c591bdacdf6e676e26ae864b1b161fa473aac69c..7f0867d4c4feb4601b2c9ce88b434df64eff8127 100644 --- a/zh-cn/application-dev/basic-services/usb/usbSerial/usbSerial-overview.md +++ b/zh-cn/application-dev/basic-services/usb/usbSerial/usbSerial-overview.md @@ -51,10 +51,10 @@ USB串口服务主要包括两个阶段: - SDK版本配置: - 本模块提供的ArkTs接口,所需SDK版本为API18及以上才可使用。 + 本模块提供的ArkTs接口,所需SDK版本为API19及以上才可使用。 ### 搭建环境 - 在PC上安装[DevEco Studio](https://developer.huawei.com/consumer/cn/download/deveco-studio),要求版本在4.1及以上。 -- 将public-SDK更新到API 18或以上,更新SDK的具体操作可参见[更新指南](../../../tools/openharmony_sdk_upgrade_assistant.md)。 +- 将public-SDK更新到API 19或以上,更新SDK的具体操作可参见[更新指南](../../../tools/openharmony_sdk_upgrade_assistant.md)。 - 准备一根USB转串口线缆,线缆的USB接口连接到OpenHarmony设备USB端口(该端口需支持USB转串口),线缆的串口接口连接到目标设备的串口上。 \ No newline at end of file diff --git a/zh-cn/application-dev/distributedservice/camera-distributed.md b/zh-cn/application-dev/distributedservice/camera-distributed.md index 6b15a1b427b5eb0c71d70611f8cacc1a3adc35d8..e26063a0e782699f15de1a5d02371f9559d6f669 100644 --- a/zh-cn/application-dev/distributedservice/camera-distributed.md +++ b/zh-cn/application-dev/distributedservice/camera-distributed.md @@ -89,7 +89,7 @@ console.log("testTag", data); }) .catch((err : BusinessError) => { - console.log("testTag", err.message); + console.error("testTag", err.message); }); } ``` @@ -119,7 +119,7 @@ if (this.cameraManager) { console.info('[camera] case getCameraManager success'); } else { - console.info('[camera] case getCameraManager failed'); + console.error('[camera] case getCameraManager failed'); return; } this.cameras = this.cameraManager.getSupportedCameras(); @@ -137,7 +137,7 @@ } } } else { - console.info('[camera] case getCameras failed'); + console.error('[camera] case getCameras failed'); } } ``` @@ -159,10 +159,10 @@ await this.cameraInput.open().then(() => { console.log('[camera] case cameraInput.open() success'); }).catch((err: Error) => { - console.log('[camera] cameraInput.open then.error:', json.stringify(err)); + console.error('[camera] cameraInput.open then.error:', json.stringify(err)); }); } else { - console.log('[camera] case createCameraInput failed'); + console.error('[camera] case createCameraInput failed'); return; } } @@ -196,7 +196,7 @@ } this.previewOutput = this.cameraManager.createPreviewOutput(this.previewProfiles[0], this.surfaceId); if (!this.previewOutput) { - console.log('create previewOutput failed!'); + console.error('create previewOutput failed!'); } console.log('createPreviewOutput done'); } @@ -244,19 +244,19 @@ } } if (!this.cameraManager) { - console.log('createPhotoOutput cameraManager is null') + console.error('createPhotoOutput cameraManager is null') } if (!this.photoReceiver) { this.photoReceiver = image.createImageReceiver(photoProfile.size.width, photoProfile.size.height, photoProfile.format, 8) this.photoReceiver.on("imageArrival",()=>{ this.photoReceiver?.readNextImage((err,image)=>{ if (err || image === undefined) { - console.log('photoReceiver imageArrival on error') + console.error('photoReceiver imageArrival on error') return } image.getComponent(4, async (err, img) => { if (err || img === undefined) { - console.log('image getComponent on error') + console.error('image getComponent on error') return } await this.getImageFileFd() @@ -270,7 +270,7 @@ await this.photoReceiver.getReceivingSurfaceId().then((surfaceId: string) => { this.photoOutput = this.cameraManager?.createPhotoOutput(photoProfile, surfaceId) if (!this.photoOutput) { - console.log('cameraManager.createPhotoOutput on error') + console.error('cameraManager.createPhotoOutput on error') } console.log('cameraManager.createPhotoOutput success') this.photoOutput?.on("captureStart", (err, captureId) => { @@ -291,11 +291,11 @@ private captureSession?: camera.CaptureSession; function failureCallback(error: BusinessError): Promise { - console.log('case failureCallback called,errMessage is ', json.stringify(error)); + console.error('case failureCallback called,errMessage is ', json.stringify(error)); } function catchCallback(error: BusinessError): Promise { - console.log('case catchCallback called,errMessage is ', json.stringify(error)); + console.error('case catchCallback called,errMessage is ', json.stringify(error)); } // create camera capture session @@ -304,19 +304,19 @@ if (this.cameraManager) { this.captureSession = this.cameraManager.createCaptureSession(); if (!this.captureSession) { - console.log('createCaptureSession failed!'); + console.error('createCaptureSession failed!'); return } try { this.captureSession.beginConfig(); this.captureSession.addInput(this.cameraInput); } catch (e) { - console.log('case addInput error:' + json.stringify(e)); + console.error('case addInput error:' + json.stringify(e)); } try { this.captureSession.addOutput(this.previewOutput); } catch (e) { - console.log('case addOutput error:' + json.stringify(e)); + console.error('case addOutput error:' + json.stringify(e)); } await this.captureSession.commitConfig().then(() => { console.log('captureSession commitConfig success'); @@ -334,7 +334,7 @@ async startCaptureSession(): Promise { console.log('startCaptureSession called'); if (!this.captureSession) { - console.log('CaptureSession does not exists!'); + console.error('CaptureSession does not exists!'); return } await this.captureSession.start().then(() => { diff --git a/zh-cn/release-notes/changelogs/OpenHarmony_5.0.0.23/ changelogs-global.md b/zh-cn/release-notes/changelogs/OpenHarmony_5.0.0.23/changelogs-global.md similarity index 96% rename from zh-cn/release-notes/changelogs/OpenHarmony_5.0.0.23/ changelogs-global.md rename to zh-cn/release-notes/changelogs/OpenHarmony_5.0.0.23/changelogs-global.md index 9e67481a5a7b0d111f9ab22ca888319056208b01..dfa480a575af975b4af3d59cad39472d9c7180fd 100644 --- a/zh-cn/release-notes/changelogs/OpenHarmony_5.0.0.23/ changelogs-global.md +++ b/zh-cn/release-notes/changelogs/OpenHarmony_5.0.0.23/changelogs-global.md @@ -1,46 +1,46 @@ -# Global变更说明 - -## cl.global.1 ohos.i18n部分接口入参类型校验失败错误码抛出变更 - -**变更原因** - -401错误码是通用的参数类型检查错误码,原890001错误码不再在参数类型检查场景抛出 - -**变更影响** - -该变更为不兼容变更。 - -变更前:参数类型错误抛出890001 - -变更后:参数类型错误抛出401 - -更改后应用开发者需要捕捉新的错误码进行错误处理。 -当前IDE已有编译阶段参数类型检查,如果使用IDE进行编译,基本无影响。 - -**起始API Level** - -API 12 - -**变更发生版本** - -从OpenHarmony SDK 5.0.0.23 版本开始。 - -**变更的接口/组件** - -ohos.i18n 发生变化的接口如下表格所示。 -| 变更的接口 | 访问级别 | 起始 API Level | 变更发生版本 | -|--------|--------|--------|--------| -| getSystemCountries | 公开接口 | 9 | 12 | -| isSuggested | 公开接口 | 9 | 12 | -| getHolidayInfoItemArray | 公开接口 | 11 | 12 | -| isHoliday | 公开接口 | 11 | 12 | -| getDisplayCountry | 公开接口 | 9 | 12 | -| getDisplayLanguage | 公开接口 | 11 | 12 | -| getLanguageInfoArray | 系统接口 | 11 | 12 | -| getRegionInfoArray | 系统接口 | 10 | 12 | -| setUsingLocalDigit | 系统接口 | 10 | 12 | -| removePreferredLanguage | 系统接口 | 9 | 12 | - -**适配指导** - -入参类型不匹配错误码由890001变更为401,异常处理使用新错误码 +# Global变更说明 + +## cl.global.1 ohos.i18n部分接口入参类型校验失败错误码抛出变更 + +**变更原因** + +401错误码是通用的参数类型检查错误码,原890001错误码不再在参数类型检查场景抛出 + +**变更影响** + +该变更为不兼容变更。 + +变更前:参数类型错误抛出890001 + +变更后:参数类型错误抛出401 + +更改后应用开发者需要捕捉新的错误码进行错误处理。 +当前IDE已有编译阶段参数类型检查,如果使用IDE进行编译,基本无影响。 + +**起始API Level** + +API 12 + +**变更发生版本** + +从OpenHarmony SDK 5.0.0.23 版本开始。 + +**变更的接口/组件** + +ohos.i18n 发生变化的接口如下表格所示。 +| 变更的接口 | 访问级别 | 起始 API Level | 变更发生版本 | +|--------|--------|--------|--------| +| getSystemCountries | 公开接口 | 9 | 12 | +| isSuggested | 公开接口 | 9 | 12 | +| getHolidayInfoItemArray | 公开接口 | 11 | 12 | +| isHoliday | 公开接口 | 11 | 12 | +| getDisplayCountry | 公开接口 | 9 | 12 | +| getDisplayLanguage | 公开接口 | 11 | 12 | +| getLanguageInfoArray | 系统接口 | 11 | 12 | +| getRegionInfoArray | 系统接口 | 10 | 12 | +| setUsingLocalDigit | 系统接口 | 10 | 12 | +| removePreferredLanguage | 系统接口 | 9 | 12 | + +**适配指导** + +入参类型不匹配错误码由890001变更为401,异常处理使用新错误码