From d81fdc9bb4605d07217154babd1390037c0d35c6 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Sun, 14 Aug 2022 03:01:54 +0800 Subject: [PATCH] Modify add detail message when checkingInternal failure --- .../yukihookapi/hook/factory/ReflectionFactory.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/factory/ReflectionFactory.kt b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/factory/ReflectionFactory.kt index 8647c9e0..6fd036c2 100644 --- a/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/factory/ReflectionFactory.kt +++ b/yukihookapi/src/api/kotlin/com/highcapable/yukihookapi/hook/factory/ReflectionFactory.kt @@ -230,6 +230,8 @@ inline fun Class<*>.allFields(result: (index: Int, field: Field) -> Unit) = @PublishedApi internal fun Class<*>.checkingInternal() { if (name == classOf().name) return - if (name == classOf().name || name.startsWith(prefix = "com.highcapable.yukihookapi.hook")) - throw RuntimeException("!!!DO NOT ALLOWED!!! You cannot hook or reflection to call the internal class of the YukiHookAPI itself") + if (name == classOf().name || name.startsWith(prefix = "com.highcapable.yukihookapi.hook")) throw RuntimeException( + "!!!DO NOT ALLOWED!!! You cannot hook or reflection to call the internal class of the YukiHookAPI itself, " + + "The called class is [$this]" + ) } \ No newline at end of file