From c0a1ab0e1d7e93ac84d806e5ab4d46550f93caed Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Wed, 27 Sep 2023 19:32:14 +0800 Subject: [PATCH] refactor: make throwable dump in logs --- .../yukireflection/finder/tools/ReflectionTool.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/tools/ReflectionTool.kt b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/tools/ReflectionTool.kt index 889fb16..d0abf7a 100644 --- a/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/tools/ReflectionTool.kt +++ b/yukireflection-core/src/main/java/com/highcapable/yukireflection/finder/tools/ReflectionTool.kt @@ -666,7 +666,7 @@ internal object ReflectionTool { addAll(declaredConstructors.toList()) }.asSequence() }.onFailure { - YukiLog.warn(msg = "Failed to get the declared Members in [$this] because got an exception\n$it") + YukiLog.warn(msg = "Failed to get the declared Members in [$this] because got an exception", e = it) }.getOrNull() /** @@ -675,7 +675,7 @@ internal object ReflectionTool { */ private val Class<*>.existFields get() = runCatching { declaredFields.asSequence() }.onFailure { - YukiLog.warn(msg = "Failed to get the declared Fields in [$this] because got an exception\n$it") + YukiLog.warn(msg = "Failed to get the declared Fields in [$this] because got an exception", e = it) }.getOrNull() /** @@ -684,7 +684,7 @@ internal object ReflectionTool { */ private val Class<*>.existMethods get() = runCatching { declaredMethods.asSequence() }.onFailure { - YukiLog.warn(msg = "Failed to get the declared Methods in [$this] because got an exception\n$it") + YukiLog.warn(msg = "Failed to get the declared Methods in [$this] because got an exception", e = it) }.getOrNull() /** @@ -693,7 +693,7 @@ internal object ReflectionTool { */ private val Class<*>.existConstructors get() = runCatching { declaredConstructors.asSequence() }.onFailure { - YukiLog.warn(msg = "Failed to get the declared Constructors in [$this] because got an exception\n$it") + YukiLog.warn(msg = "Failed to get the declared Constructors in [$this] because got an exception", e = it) }.getOrNull() /**