Unexpected exception handling in unit tests with coroutines
I’m observing a strange result in my unit tests concerning the behavior of exception handling in coroutines.
When an exception E with a cause C is thrown from within a coroutine scope, and we catch E outside the scope, the cause of E is another exception E’ of the same type of E instead of its cause C. The cause C, however, can be found as the cause of E’.
This is better understandable through a concrete example. The following is a minimal test method that reproduces this behavior:
@Test
fun...