Skip to content
This repository was archived by the owner on Jan 20, 2023. It is now read-only.

Commit 8e5f044

Browse files
committed
エラーメッセージを読みやすいよう修正
1 parent 421522b commit 8e5f044

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/kotlin/com/mapk/core/KFunctionForCall.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import kotlin.reflect.full.findAnnotation
1515
import kotlin.reflect.full.functions
1616
import kotlin.reflect.full.primaryConstructor
1717
import kotlin.reflect.jvm.isAccessible
18+
import kotlin.reflect.jvm.jvmName
1819
import org.jetbrains.annotations.TestOnly
1920

2021
class KFunctionForCall<T> internal constructor(
@@ -106,7 +107,7 @@ internal fun <T : Any> KClass<T>.toKConstructor(parameterNameConverter: Paramete
106107

107108
if (constructors.isEmpty()) return KFunctionForCall(this.primaryConstructor!!, parameterNameConverter)
108109

109-
throw IllegalArgumentException("Find multiple target.")
110+
throw IllegalArgumentException("${this.jvmName} has multiple ${KConstructor::class.jvmName}.")
110111
}
111112

112113
@Suppress("UNCHECKED_CAST")

0 commit comments

Comments
 (0)