diff --git a/plugins/performanceTesting/event-bus/src/com/intellij/tools/ide/starter/bus/local/LocalEventsFlow.kt b/plugins/performanceTesting/event-bus/src/com/intellij/tools/ide/starter/bus/local/LocalEventsFlow.kt index 579c8b035b80..7a25ce4c1963 100644 --- a/plugins/performanceTesting/event-bus/src/com/intellij/tools/ide/starter/bus/local/LocalEventsFlow.kt +++ b/plugins/performanceTesting/event-bus/src/com/intellij/tools/ide/starter/bus/local/LocalEventsFlow.kt @@ -116,15 +116,18 @@ class LocalEventsFlow : EventsFlow { } return@map result } - ?.forEach { + runBlocking { + // awaitAll shouldn't be used as it would stop after the first exception from any coroutine + tasks?.forEach { try { - runBlocking { it.await() } + it.await() } catch (e: Throwable) { LOG.info("Exception occurred while processing $e") exceptions.add(e) } } + } LOG.debug("All exceptions: $exceptions") if (exceptions.isNotEmpty()) {