From fa2d0435a1583cc10f9a2c1c468551d56c487847 Mon Sep 17 00:00:00 2001 From: Him188 Date: Thu, 28 Nov 2019 21:21:23 +0800 Subject: [PATCH] Add optional message --- .../commonMain/kotlin/net.mamoe.mirai/utils/io/InputUtils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/InputUtils.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/InputUtils.kt index d96845200..e080637b6 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/InputUtils.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/io/InputUtils.kt @@ -141,7 +141,7 @@ fun Map.printTLVMap(name: String = "", keyLength: Int = 1) = }) @Suppress("NOTHING_TO_INLINE") -internal inline fun unsupported(): Nothing = error("Unsupported") +internal inline fun unsupported(message: String? = null): Nothing = error(message ?: "Unsupported") @Suppress("NOTHING_TO_INLINE") internal inline fun illegalArgument(message: String? = null): Nothing = error(message ?: "Illegal argument passed")