openharmony 鸿蒙 js-apis-application-formError

2025-06-12 浏览 (1)

@ohos.application.formError (formError)

The formError module provides error codes for widgets.

NOTE

The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. This module is deprecated since API version 9. You are advised to use Form Error Codes instead.

Modules to Import

import { formError } from '@kit.FormKit';

Required Permissions

None.

FormError

Enumerates the widget types.

System capability: SystemCapability.Ability.Form

NameValueDescription
ERR_COMMON1Default error code.
ERR_PERMISSION_DENY2You are not authorized to perform the operation.
ERR_GET_INFO_FAILED4Failed to obtain the widget information.
ERR_GET_BUNDLE_FAILED5Failed to obtain the bundle information.
ERR_GET_LAYOUT_FAILED6Failed to obtain the layout information.
ERR_ADD_INVALID_PARAM7Invalid parameters are detected.
ERR_CFG_NOT_MATCH_ID8The widget ID does not match any widget.
ERR_NOT_EXIST_ID9The widget ID does not exist.
ERR_BIND_PROVIDER_FAILED10Failed to bind to the widget provider.
ERR_MAX_SYSTEM_FORMS11The number of system widgets exceeds the upper limit.
ERR_MAX_INSTANCES_PER_FORM12The number of instances per widget exceeds the upper limit.
ERR_OPERATION_FORM_NOT_SELF13The application is not allowed to operate widgets provided by other applications.
ERR_PROVIDER_DEL_FAIL14The widget provider failed to delete the widget.
ERR_MAX_FORMS_PER_CLIENT15The number of widgets applied for by the widget host exceeds the upper limit.
ERR_MAX_SYSTEM_TEMP_FORMS16The number of temporary widgets exceeds the upper limit.
ERR_FORM_NO_SUCH_MODULE17The module does not exist.
ERR_FORM_NO_SUCH_ABILITY18The ability component does not exist.
ERR_FORM_NO_SUCH_DIMENSION19The widget dimension does not exist.
ERR_FORM_FA_NOT_INSTALLED20The FA where the widget is located is not installed.
ERR_SYSTEM_RESPONSES_FAILED30The system service failed to respond.
ERR_FORM_DUPLICATE_ADDED31The widget has been added.
ERR_IN_RECOVERY36Failed to overwrite the widget data.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Form Kit

harmony 鸿蒙Form Error Codes

harmony 鸿蒙@ohos.app.form.formAgent (FormAgent) (System API)

harmony 鸿蒙@ohos.app.form.formBindingData (formBindingData)

harmony 鸿蒙@ohos.app.form.FormEditExtensionAbility (FormEditExtensionAbility)

harmony 鸿蒙@ohos.app.form.FormExtensionAbility (FormExtensionAbility) (System API)

harmony 鸿蒙@ohos.app.form.FormExtensionAbility (FormExtensionAbility)

harmony 鸿蒙@ohos.app.form.formHost (formHost) (System API)

harmony 鸿蒙@ohos.app.form.formInfo (formInfo) (System API)

harmony 鸿蒙@ohos.app.form.formInfo (formInfo)

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