From 7bb4caa7915e88b68ec5bb6bf87e6b880738e356 Mon Sep 17 00:00:00 2001 From: Dmitry Khalanskiy Date: Tue, 2 May 2023 14:31:35 +0200 Subject: [PATCH] Fix the error message if there were uncaught exceptions before test 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." )