assertFailsWith

@SinceKotoolsAssert(version = "2.1")
inline fun <T : Throwable> assertFailsWith(block: () -> Unit): T

Asserts that the block function throws an error of type T, and returns this error.