File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
utbot-framework/src/main/kotlin/org/utbot/framework/plugin/api Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import kotlinx.coroutines.CoroutineScope
44import kotlinx.coroutines.GlobalScope
55import kotlinx.coroutines.cancel
66import kotlinx.coroutines.flow.Flow
7+ import kotlinx.coroutines.flow.catch
78import kotlinx.coroutines.flow.collect
89import kotlinx.coroutines.isActive
910import kotlinx.coroutines.launch
@@ -159,12 +160,16 @@ open class TestCaseGenerator(
159160
160161 engineActions.map { engine.apply (it) }
161162
162- generate(engine).collect {
163- when (it) {
164- is UtExecution -> method2executions.getValue(method) + = it
165- is UtError -> method2errors.getValue(method).merge(it.description, 1 , Int ::plus)
163+ generate(engine)
164+ .catch {
165+ logger.error(it) { " Error in flow" }
166+ }
167+ .collect {
168+ when (it) {
169+ is UtExecution -> method2executions.getValue(method) + = it
170+ is UtError -> method2errors.getValue(method).merge(it.description, 1 , Int ::plus)
171+ }
166172 }
167- }
168173 }
169174 controller.paused = true
170175 }
You can’t perform that action at this time.
0 commit comments