harmony 鸿蒙@ohos.ability.errorCode (ErrorCode)

  • 2025-06-12
  • 浏览 (2)

@ohos.ability.errorCode (ErrorCode)

ErrorCode定义启动Ability时返回的错误码,包括无效的参数、权限拒绝等。

说明:

本模块首批接口从API version 6开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。

导入模块

import { ErrorCode } from '@kit.AbilityKit';

ErrorCode

定义启动Ability时返回的错误码。

系统能力:SystemCapability.Ability.AbilityRuntime.Core

名称 说明
NO_ERROR 0 没有异常。
INVALID_PARAMETER -1 无效的参数。
ABILITY_NOT_FOUND -2 找不到ABILITY。
PERMISSION_DENY -3 权限拒绝。

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Ability Kit(程序框架服务)

harmony 鸿蒙AbilityBase

harmony 鸿蒙AbilityBase_Element

harmony 鸿蒙AbilityRuntime

harmony 鸿蒙bundle

harmony 鸿蒙OH_NativeBundle_ApplicationInfo

harmony 鸿蒙OH_NativeBundle_ElementName

harmony 鸿蒙ability_base_common.h

harmony 鸿蒙ability_runtime_common.h

harmony 鸿蒙application_context.h

0  赞