<Unexpected behavior when handling exceptions thro...
# forum
r
Unexpected behavior when handling exceptions thrown from a couroutine scope in unit tests 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...