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 #pragma once 17 18 #include <cstdint> 19 20 namespace OHOS::Ace { 21 22 // Common error code 23 constexpr int32_t ERROR_CODE_NO_ERROR = 0; 24 constexpr int32_t ERROR_CODE_PERMISSION_DENIED = 201; // The application does not have permission to call the interface. 25 constexpr int32_t ERROR_CODE_PARAM_INVALID = 401; // Invalid input parameter. 26 constexpr int32_t ERROR_CODE_SYSTEMCAP_ERROR = 801; // The specified SystemCapability names was not found. 27 28 // Notification error code 29 constexpr int32_t ERROR_CODE_INTERNAL_ERROR = 100001; // Internal error. 30 constexpr int32_t ERROR_CODE_URI_ERROR = 100002; // Uri error. 31 constexpr int32_t ERROR_CODE_PAGE_STACK_FULL = 100003; // The pages are pushed too much. 32 constexpr int32_t ERROR_CODE_NAMED_ROUTE_ERROR = 100004; // Named route error. 33 constexpr int32_t ERROR_CODE_URI_ERROR_LITE = 200002; // Uri error for lite. 34 35 // push destination error code 36 constexpr int32_t ERROR_CODE_BUILDER_FUNCTION_NOT_REGISTERED = 100005; // builder function not registered 37 constexpr int32_t ERROR_CODE_DESTINATION_NOT_FOUND = 100006; // navDestination not found 38 39 // Send synchronous message error code 40 // No callback has been registered to process synchronous data transferring. 41 constexpr int32_t ERROR_CODE_UIEXTENSION_NOT_REGISTER_SYNC_CALLBACK = 100011; 42 // Transferring data failed 43 constexpr int32_t ERROR_CODE_UIEXTENSION_TRANSFER_DATA_FAILED = 100012; 44 45 // C-API errors 46 constexpr int32_t ERROR_CODE_NATIVE_IMPL_LIBRARY_NOT_FOUND = 106101; 47 constexpr int32_t ERROR_CODE_NATIVE_IMPL_TYPE_NOT_SUPPORTED = 106102; 48 49 // Drag event error code 50 constexpr int32_t ERROR_CODE_DRAG_DATA_NOT_FOUND = 190001; // GetData failed, data not found. 51 constexpr int32_t ERROR_CODE_DRAG_DATA_ERROR = 190002; // GetData failed, data error. 52 53 } // namespace OHOS::Ace