You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val result = runCatching {
coroutineScope<Unit> {
throw RuntimeException("outer", IllegalStateException("inner"))
}
}
val ex = result.exceptionOrNull() ?: error("Expected to fail")
assertIs<RuntimeException>(ex)
assertEquals("outer", ex.message)
val originalCause = ex?.cause
assertIs<IllegalStateException>(originalCause)
assertEquals("inner", originalCause.message)
The text was updated successfully, but these errors were encountered:
By the way, if you need to access the original exception regardless of whether stacktrace recovery was enabled, please describe your use cases in a reply to #2551 (comment)
See #3714 (comment)
This test asserts wrong behaviour.
Correct test:
The text was updated successfully, but these errors were encountered: