Add optional message

This commit is contained in:
Him188 2019-11-28 21:21:23 +08:00
parent 494b160ade
commit fa2d0435a1

View File

@ -141,7 +141,7 @@ fun Map<UInt, ByteArray>.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")