From 298419f8accffb496cc8ea11187120a5d65586c0 Mon Sep 17 00:00:00 2001 From: Dmitry Khalanskiy <52952525+dkhalanskyjb@users.noreply.github.com> Date: Wed, 3 May 2023 11:18:50 +0300 Subject: [PATCH] Fix the error message if there were uncaught exceptions before test (#3733) With #3449, the unrelated uncaught exceptions can also be caught in this manner. --- kotlinx-coroutines-test/common/src/TestScope.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kotlinx-coroutines-test/common/src/TestScope.kt b/kotlinx-coroutines-test/common/src/TestScope.kt index a5a36a8524..e72f0f14f3 100644 --- a/kotlinx-coroutines-test/common/src/TestScope.kt +++ b/kotlinx-coroutines-test/common/src/TestScope.kt @@ -312,7 +312,7 @@ internal fun TestScope.asSpecificImplementation(): TestScopeImpl = when (this) { } internal class UncaughtExceptionsBeforeTest : IllegalStateException( - "There were uncaught exceptions in coroutines launched from TestScope before the test started. Please avoid this," + + "There were uncaught exceptions before the test started. Please avoid this," + " as such exceptions are also reported in a platform-dependent manner so that they are not lost." )