1 /*
2  * Copyright (c) 2024 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 ERROR_H
17 #define ERROR_H
18 
19 #include "hiappevent_base.h"
20 
21 namespace OHOS {
22 namespace CJSystemapi {
23 namespace HiAppEvent {
24 // CJ error
25 constexpr int ERR_PARAM = 401;
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 constexpr int ERR_INVALID_WATCHER_NAME = 11102001;
34 constexpr int ERR_INVALID_FILTER_DOMAIN = 11102002;
35 constexpr int ERR_INVALID_COND_ROW = 11102003;
36 constexpr int ERR_INVALID_COND_SIZE = 11102004;
37 constexpr int ERR_INVALID_COND_TIMEOUT = 11102005;
38 constexpr int ERR_INVALID_MAX_STORAGE = 11103001;
39 constexpr int ERR_INVALID_SIZE = 11104001;
40 
41 int GetErrorCode(int errCode);
42 } // HiAppEvent
43 } // CJSystemapi
44 } // OHOS
45 
46 #endif