1 /* 2 * Copyright (c) 2025 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 #ifndef DISTRIBUTEDDATAMGR_RDB_DFX_ERRNO_H 16 #define DISTRIBUTEDDATAMGR_RDB_DFX_ERRNO_H 17 #include <errors.h> 18 namespace OHOS { 19 namespace NativeRdb { 20 21 /** 22 * @brief The base code of the exception dfx error code, base value is 0x1A28000. 23 */ 24 constexpr int E_DFX_BASE = ErrCodeOffset(SUBSYS_DISTRIBUTEDDATAMNG, 2) + 0x8000; 25 26 /** 27 * @brief Database db err message is not create. 28 */ 29 static constexpr int E_DFX_IS_NOT_CREATE = (E_DFX_BASE + 0x1); 30 31 /** 32 * @brief Database db err message is delete. 33 */ 34 static constexpr int E_DFX_IS_DELETE = (E_DFX_BASE + 0x2); 35 36 /** 37 * @brief Database db err message is rename. 38 */ 39 static constexpr int E_DFX_IS_RENAME = (E_DFX_BASE + 0x3); 40 41 /** 42 * @brief Database db err message is not exist. 43 */ 44 static constexpr int E_DFX_IS_NOT_EXIST = (E_DFX_BASE + 0x4); 45 46 /** 47 * @brief Only use for dfx, sqlite error log. 48 */ 49 static constexpr int E_DFX_SQLITE_LOG = (E_DFX_BASE + 0x5); 50 51 /** 52 * @brief Only use for dfx, batch insert args size too big. 53 */ 54 static constexpr int E_DFX_BATCH_INSERT_ARGS_SIZE = (E_DFX_BASE + 0x6); 55 56 /** 57 * @brief Only use for dfx, get journal mode fail. 58 */ 59 static constexpr int E_DFX_GET_JOURNAL_FAIL = (E_DFX_BASE + 0x7); 60 61 /** 62 * @brief Only use for dfx, set journal mode fail. 63 */ 64 static constexpr int E_DFX_SET_JOURNAL_FAIL = (E_DFX_BASE + 0x8); 65 66 /** 67 * @brief Only use for dfx, print dump info. 68 */ 69 static constexpr int E_DFX_DUMP_INFO = (E_DFX_BASE + 0x9); 70 71 /** 72 * @brief Only use for dfx, print group id info. 73 */ 74 static constexpr int E_DFX_GROUPID_INFO = (E_DFX_BASE + 0xA); 75 } // namespace NativeRdb 76 } // namespace OHOS 77 78 #endif // DISTRIBUTEDDATAMGR_RDB_DFX_ERRNO_H