• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# @ohos.application.formError (formError)
2<!--Kit: Form Kit-->
3<!--Subsystem: Ability-->
4<!--Owner: @cx983299475-->
5<!--Designer: @xueyulong-->
6<!--Tester: @chenmingze-->
7<!--Adviser: @Brilliantry_Rui-->
8
9The **formError** module provides error codes for widgets.
10
11> **NOTE**
12>
13> 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.
14> This module is deprecated since API version 9. You are advised to use [Form Error Codes](errorcode-form.md) instead.
15
16## Modules to Import
17
18```ts
19import { formError } from '@kit.FormKit';
20```
21
22## Required Permissions
23
24None.
25
26## FormError
27
28Enumerates the widget types.
29
30**System capability**: SystemCapability.Ability.Form
31
32| Name       | Value  | Description        |
33| ----------- | ---- | ------------ |
34| ERR_COMMON       | 1    | Default error code.  |
35| ERR_PERMISSION_DENY       | 2    | You are not authorized to perform the operation.  |
36| ERR_GET_INFO_FAILED      | 4    | Failed to obtain the widget information.  |
37| ERR_GET_BUNDLE_FAILED    | 5    | Failed to obtain the bundle information.  |
38| ERR_GET_LAYOUT_FAILED    | 6    | Failed to obtain the layout information.  |
39| ERR_ADD_INVALID_PARAM     | 7    | Invalid parameters are detected.  |
40| ERR_CFG_NOT_MATCH_ID     | 8    | The widget ID does not match any widget. |
41| ERR_NOT_EXIST_ID       | 9    | The widget ID does not exist.  |
42| ERR_BIND_PROVIDER_FAILED       | 10    | Failed to bind to the widget provider.  |
43| ERR_MAX_SYSTEM_FORMS      | 11    | The number of system widgets exceeds the upper limit.  |
44| ERR_MAX_INSTANCES_PER_FORM     | 12    | The number of instances per widget exceeds the upper limit.  |
45| ERR_OPERATION_FORM_NOT_SELF     | 13    | The application is not allowed to operate widgets provided by other applications.  |
46| ERR_PROVIDER_DEL_FAIL       | 14    | The widget provider failed to delete the widget.  |
47| ERR_MAX_FORMS_PER_CLIENT       | 15    | The number of widgets applied for by the widget host exceeds the upper limit.  |
48| ERR_MAX_SYSTEM_TEMP_FORMS       | 16    | The number of temporary widgets exceeds the upper limit.  |
49| ERR_FORM_NO_SUCH_MODULE       | 17    | The module does not exist.  |
50| ERR_FORM_NO_SUCH_ABILITY       | 18    | The ability component does not exist.  |
51| ERR_FORM_NO_SUCH_DIMENSION      | 19    | The widget dimension does not exist.  |
52| ERR_FORM_FA_NOT_INSTALLED      | 20    | The FA where the widget is located is not installed.  |
53| ERR_SYSTEM_RESPONSES_FAILED        | 30    | The system service failed to respond.  |
54| ERR_FORM_DUPLICATE_ADDED        | 31    | The widget has been added.  |
55| ERR_IN_RECOVERY    | 36    | Failed to overwrite the widget data.  |
56