expectError

inline fun <reified T : Throwable> expectError(noinline check: T.() -> Unit = {}): T

The command's decide function threw a T (9.x's expectError), which check checks: nothing was written. A rejection is not an error: expectRejected checks it.


fun <T : Throwable> expectError(type: KClass<T>, check: T.() -> Unit = {}): T

The command's decide function threw a type, which check checks.