From 523021ae439b8e5d73a426a351a1bea0bce3503c Mon Sep 17 00:00:00 2001 From: Caoruihong Date: Wed, 18 Jun 2025 03:55:40 +0000 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85PluginErrorData=E5=B8=B8?= =?UTF-8?q?=E8=A7=81=E9=94=99=E8=AF=AF=E7=A0=81=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Caoruihong --- .../ts-basic-components-plugincomponent-sys.md | 13 +++++++++++++ .../ts-basic-components-plugincomponent-sys.md | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/en/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-plugincomponent-sys.md b/en/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-plugincomponent-sys.md index 5084ee2f157..ffe40f55dba 100644 --- a/en/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-plugincomponent-sys.md +++ b/en/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-plugincomponent-sys.md @@ -106,6 +106,19 @@ Defines the data provided when an error occurs during component loading. | errcode | number | Error code. | | msg | string | Error message. | +Common Error Code Description: + +| Error code | Error message | Description | +| ---------- | ------ | -------------------------- | +| 1 | package path is empty. | package path is empty. | +| 1 | Query Active OsAccountIds failed! | Query Active OsAccountIds failed. | +| 1 | Template source is empty. | Template source is empty. | +| 1 | Bms bundleManager is nullptr. | Get BundleManager failed. | +| 1 | App bundleName is empty. | App bundleName is empty. | +| 1 | Bms get bundleName failed! | Bms get bundleName failed. | +| 1 | Bms moduleResPaths is empty. | Bms moduleResPaths is empty. | +| 1 | Bms get hapPath failed! Cannot find hap according to BundleName and ModuleName! | Bms get hapPath failed. | + ## Example: Loading a PluginComponent This example demonstrates the basic usage of the **PluginComponent**. Specifically, you need to create an application acting as the **PluginComponent** [user](#plugincomponent-user) with the bundle name of **"com.example.user"** and an application acting as the **PluginComponent** [provider](#plugincomponent-provider) with the bundle name of **"com.example.provider"**. After building the application projects, perform the following steps for testing: diff --git a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-plugincomponent-sys.md b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-plugincomponent-sys.md index f5f8b68cee3..81074e088cd 100644 --- a/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-plugincomponent-sys.md +++ b/zh-cn/application-dev/reference/apis-arkui/arkui-ts/ts-basic-components-plugincomponent-sys.md @@ -116,6 +116,19 @@ onError(callback: PluginErrorCallback) | errcode | number | 错误码。 | | msg | string | 错误信息。 | +常见错误码说明: + +| 错误码 | 错误信息 | 描述 | +| ---------- | ------ | -------------------------- | +| 1 | package path is empty. | 包路径为空。 | +| 1 | Query Active OsAccountIds failed! | 获取激活的用户ID失败。 | +| 1 | Template source is empty. | 模板source为空。 | +| 1 | Bms bundleManager is nullptr. | 获取BundleManager失败。 | +| 1 | App bundleName is empty. | 应用包名为空。 | +| 1 | Bms get bundleName failed! | 获取包名失败。 | +| 1 | Bms moduleResPaths is empty. | moduleResPaths为空。 | +| 1 | Bms get hapPath failed! Cannot find hap according to BundleName and ModuleName! | 获取hapPath失败。 | + ## 示例(加载PluginComponent) 本示例展示`PluginComponent`组件的基础使用方式,需要创建一个`bundleName`为"com.example.user"的[使用方应用](#组件使用方),和一个`bundleName`为"com.example.provider"的[提供方应用](#组件提供方)。应用项目构建完成后,具体测试步骤如下: -- Gitee