diff --git a/AbilityKit/ability_runtime/ability_runtime_common.h b/AbilityKit/ability_runtime/ability_runtime_common.h index d6220b080..e4cf556e4 100644 --- a/AbilityKit/ability_runtime/ability_runtime_common.h +++ b/AbilityKit/ability_runtime/ability_runtime_common.h @@ -51,6 +51,8 @@ typedef enum { ABILITY_RUNTIME_ERROR_CODE_NO_ERROR = 0, /** @error Invalid parameters. */ ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID = 401, + /** @error The context does not exist. */ + ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST = 16000011, } AbilityRuntime_ErrorCode; #ifdef __cplusplus @@ -58,4 +60,4 @@ typedef enum { #endif /** @} */ -#endif //ABILITY_RUNTIME_COMMON_H +#endif // ABILITY_RUNTIME_COMMON_H diff --git a/AbilityKit/ability_runtime/application_context.h b/AbilityKit/ability_runtime/application_context.h index 374a99bd8..1ba53503d 100644 --- a/AbilityKit/ability_runtime/application_context.h +++ b/AbilityKit/ability_runtime/application_context.h @@ -57,6 +57,7 @@ extern "C" { * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. * @since 13 */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetCacheDir( @@ -69,6 +70,7 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetCacheDir( * @return The error code. * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the areaMode is null. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. * @since 13 */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetAreaMode(AbilityRuntime_AreaMode* areaMode); @@ -84,6 +86,7 @@ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetAreaMode(Ability * {@link ABILITY_RUNTIME_ERROR_CODE_NO_ERROR} if the operation is successful. * {@link ABILITY_RUNTIME_ERROR_CODE_PARAM_INVALID} if the buffer or writeLength is null, * or the buffer size is less than the minimum buffer size. + * {@link ABILITY_RUNTIME_ERROR_CODE_CONTEXT_NOT_EXIST} if the application context does not exist. * @since 13 */ AbilityRuntime_ErrorCode OH_AbilityRuntime_ApplicationContextGetBundleName(