• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 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 HIAPPEVENT_FRAMEWORKS_JS_NAPI_INCLUDE_NAPI_ERROR_H
17 #define HIAPPEVENT_FRAMEWORKS_JS_NAPI_INCLUDE_NAPI_ERROR_H
18 
19 namespace OHOS {
20 namespace HiviewDFX {
21 namespace NapiError {
22 // common api error
23 constexpr int ERR_PARAM = 401;
24 
25 // business error of write function
26 constexpr int ERR_DISABLE = 11100001;
27 constexpr int ERR_INVALID_DOMAIN = 11101001;
28 constexpr int ERR_INVALID_NAME = 11101002;
29 constexpr int ERR_INVALID_PARAM_NUM = 11101003;
30 constexpr int ERR_INVALID_STR_LEN = 11101004;
31 constexpr int ERR_INVALID_KEY = 11101005;
32 constexpr int ERR_INVALID_ARR_LEN = 11101006;
33 
34 // business error of addWatcher function
35 constexpr int ERR_INVALID_WATCHER_NAME = 11102001;
36 constexpr int ERR_INVALID_FILTER_DOMAIN = 11102002;
37 constexpr int ERR_INVALID_COND_ROW = 11102003;
38 constexpr int ERR_INVALID_COND_SIZE = 11102004;
39 constexpr int ERR_INVALID_COND_TIMEOUT = 11102005;
40 
41 // business error of configure function
42 constexpr int ERR_INVALID_MAX_STORAGE = 11103001;
43 
44 // business error of AppEventPackageHolder.setSize function
45 constexpr int ERR_INVALID_SIZE = 11104001;
46 } // namespace NapiError
47 } // namespace HiviewDFX
48 } // namespace OHOS
49 #endif // HIAPPEVENT_FRAMEWORKS_JS_NAPI_INCLUDE_NAPI_ERROR_H