1 /* 2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OHOS_ABILITY_RUNTIME_NAPI_COMMON_ERROR_H 17 #define OHOS_ABILITY_RUNTIME_NAPI_COMMON_ERROR_H 18 19 #include <string> 20 #include <unordered_map> 21 22 namespace OHOS { 23 namespace AppExecFwk { 24 #define NAPI_ERR_NO_ERROR 0 25 #define NAPI_ERR_NO_WINDOW (-1) 26 #define NAPI_ERR_NO_PERMISSION (-100) 27 #define NAPI_ERR_INNER_DATA (-101) // Internal data error, data allocation fail 28 #define NAPI_ERR_ACE_ABILITY (-102) // Failed to acquire ability object 29 #define NAPI_ERR_LONG_CALLBACK (-103) // Failed to acquire long callback object 30 #define NAPI_ERR_PARAM_INVALID (-104) // Parameter is invalid 31 #define NAPI_ERR_ABILITY_TYPE_INVALID (-105) // Type of ability is invalid 32 #define NAPI_ERR_ABILITY_CALL_INVALID (-106) // Call the ability interface, the return value is wrong 33 34 } // namespace AppExecFwk 35 } // namespace OHOS 36 #endif // OHOS_ABILITY_RUNTIME_NAPI_COMMON_ERROR_H 37