1e41f4b71Sopenharmony_ci# @ohos.ability.errorCode (ErrorCode) 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciErrorCode定义启动Ability时返回的错误码,包括无效的参数、权限拒绝等。 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci> **说明:** 6e41f4b71Sopenharmony_ci> 7e41f4b71Sopenharmony_ci> 本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci## 导入模块 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ci```ts 12e41f4b71Sopenharmony_ciimport { ErrorCode } from '@kit.AbilityKit'; 13e41f4b71Sopenharmony_ci``` 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ci## ErrorCode 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ci定义启动Ability时返回的错误码。 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ci**系统能力**:以下各项对应的系统能力均为SystemCapability.Ability.AbilityRuntime.Core 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_ci| 名称 | 值 | 说明 | 22e41f4b71Sopenharmony_ci| ------------------------------ | ---- | ---------------------------------------- | 23e41f4b71Sopenharmony_ci| NO_ERROR | 0 | 没有异常。 | 24e41f4b71Sopenharmony_ci| INVALID_PARAMETER | -1 | 无效的参数。 | 25e41f4b71Sopenharmony_ci| ABILITY_NOT_FOUND | -2 | 找不到ABILITY。 | 26e41f4b71Sopenharmony_ci| PERMISSION_DENY | -3 | 权限拒绝。 |