mirror of
https://github.com/HighCapable/YukiReflection.git
synced 2025-09-07 03:05:21 +08:00
refactor: make throwable dump in logs
This commit is contained in:
@@ -666,7 +666,7 @@ internal object ReflectionTool {
|
|||||||
addAll(declaredConstructors.toList())
|
addAll(declaredConstructors.toList())
|
||||||
}.asSequence()
|
}.asSequence()
|
||||||
}.onFailure {
|
}.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()
|
}.getOrNull()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -675,7 +675,7 @@ internal object ReflectionTool {
|
|||||||
*/
|
*/
|
||||||
private val Class<*>.existFields
|
private val Class<*>.existFields
|
||||||
get() = runCatching { declaredFields.asSequence() }.onFailure {
|
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()
|
}.getOrNull()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -684,7 +684,7 @@ internal object ReflectionTool {
|
|||||||
*/
|
*/
|
||||||
private val Class<*>.existMethods
|
private val Class<*>.existMethods
|
||||||
get() = runCatching { declaredMethods.asSequence() }.onFailure {
|
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()
|
}.getOrNull()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -693,7 +693,7 @@ internal object ReflectionTool {
|
|||||||
*/
|
*/
|
||||||
private val Class<*>.existConstructors
|
private val Class<*>.existConstructors
|
||||||
get() = runCatching { declaredConstructors.asSequence() }.onFailure {
|
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()
|
}.getOrNull()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user