mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 09:45:19 +08:00
Modify add detail message when checkingInternal failure
This commit is contained in:
@@ -230,6 +230,8 @@ inline fun Class<*>.allFields(result: (index: Int, field: Field) -> Unit) =
|
||||
@PublishedApi
|
||||
internal fun Class<*>.checkingInternal() {
|
||||
if (name == classOf<YukiHookModuleStatus>().name) return
|
||||
if (name == classOf<YukiHookAPI>().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<YukiHookAPI>().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]"
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user