From 69419f9f2eb270f5321660b7e4e318248c23d681 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Mon, 16 Oct 2023 16:01:35 +0800 Subject: [PATCH] feat: catching the single hooker exceptions --- .../com/highcapable/yukihookapi/hook/entity/YukiBaseHooker.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yukihookapi-core/src/main/java/com/highcapable/yukihookapi/hook/entity/YukiBaseHooker.kt b/yukihookapi-core/src/main/java/com/highcapable/yukihookapi/hook/entity/YukiBaseHooker.kt index 0df6a7b0..6a04ca07 100644 --- a/yukihookapi-core/src/main/java/com/highcapable/yukihookapi/hook/entity/YukiBaseHooker.kt +++ b/yukihookapi-core/src/main/java/com/highcapable/yukihookapi/hook/entity/YukiBaseHooker.kt @@ -23,6 +23,7 @@ package com.highcapable.yukihookapi.hook.entity import com.highcapable.yukihookapi.YukiHookAPI import com.highcapable.yukihookapi.annotation.xposed.InjectYukiHookWithXposed +import com.highcapable.yukihookapi.hook.log.YLog import com.highcapable.yukihookapi.hook.param.PackageParam /** @@ -44,7 +45,7 @@ abstract class YukiBaseHooker : PackageParam() { */ internal fun assignInstance(packageParam: PackageParam) { assign(packageParam.wrapper) - onHook() + runCatching { onHook() }.onFailure { YLog.innerE("An exception occurred in $this", it) } } /** 子类 Hook 开始 */