1/* 2 * Copyright (c) 2023 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/** 17 * The callback of UIAbility or UIExtensionAbility. 18 * @syscap SystemCapability.Ability.AbilityRuntime.Core 19 * @StageModelOnly 20 * @atomicservice 21 * @since 11 22 */ 23export default class AbilityStartCallback { 24 25 /** 26 * Called when some error occurred except disconnected from UIAbility or UIExtensionAbility. 27 * 28 * @param { number } code - The code returned if the UIAbility or UIExtensionAbility failed to start. 29 * @param { string } name - The name returned if the UIAbility or UIExtensionAbility failed to start. 30 * @param { string } message - The message returned if the UIAbility or UIExtensionAbility failed to start. 31 * @syscap SystemCapability.Ability.AbilityRuntime.Core 32 * @StageModelOnly 33 * @atomicservice 34 * @since 11 35 */ 36 onError(code: number, name: string, message: string): void; 37} 38