• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# @ohos.ability.errorCode (ErrorCode)
2
3<!--Kit: Ability Kit-->
4<!--Subsystem: Ability-->
5<!--Owner: @duan-sizhao-->
6<!--Designer: @ccllee1-->
7<!--Tester: @lixueqing513-->
8<!--Adviser: @huipeizi-->
9
10The ErrorCode module defines the error codes that may be returned when an ability is started.
11
12> **NOTE**
13>
14> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
15
16## Modules to Import
17
18```ts
19import { ErrorCode } from '@kit.AbilityKit';
20```
21
22## ErrorCode
23
24Enumerates the error codes that may be returned when an ability is started.
25
26**System capability**: SystemCapability.Ability.AbilityRuntime.Core
27
28| Name                            | Value   | Description                                      |
29| ------------------------------ | ---- | ---------------------------------------- |
30| NO_ERROR         | 0    | No error.  |
31| INVALID_PARAMETER | -1   | Invalid parameter.|
32| ABILITY_NOT_FOUND | -2   | The ability is not found.|
33| PERMISSION_DENY   | -3   | Permission denied.  |
34