openharmony 鸿蒙 changelogs-global

2025-06-12 浏览 (1)

Globalization Changelog

cl.global.1 ohos.i18n Change in the Error Thrown When Parameter Type Verification Failed

Reason for Change

Error code 401 is a common error code for parameter type check. The original error code 890001 is no longer thrown in the parameter type check scenario.

Change Impact

This change is a non-compatible change.

Before change: If the parameter type is incorrect, the error code 890001 is thrown.

After change: If the parameter type is incorrect, the error code 401 is thrown.

After the change, you need to capture the new error code for error handling. Currently, the IDE implements parameter type check in the compilation phase. If the IDE is used for compilation, there is no impact.

Start API Level

12

Change Since

OpenHarmony SDK 5.0.0.23

Key API/Component Changes

The following table lists the changed APIs of ohos.i18n.

APIAccess LevelStart API LevelChange Since
getSystemCountriesPublic API912
isSuggestedPublic API912
getHolidayInfoItemArrayPublic API1112
isHolidayPublic API1112
getDisplayCountryPublic API912
getDisplayLanguagePublic API1112
getLanguageInfoArraySystem API1112
getRegionInfoArraySystem API1012
setUsingLocalDigitSystem API1012
removePreferredLanguageSystem API912

Adaptation Guide

The error code for input parameter type mismatch is changed from 890001 to 401. Use the new error code for exception handling.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArkUI Subsystem Changelog

harmony 鸿蒙Multimedia Subsystem Changelog

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/px5eHY