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
4
4
import kotlinx.coroutines.GlobalScope
5
5
import kotlinx.coroutines.cancel
6
6
import kotlinx.coroutines.flow.Flow
7
+ import kotlinx.coroutines.flow.catch
7
8
import kotlinx.coroutines.flow.collect
8
9
import kotlinx.coroutines.isActive
9
10
import kotlinx.coroutines.launch
@@ -159,12 +160,16 @@ open class TestCaseGenerator(
159
160
160
161
engineActions.map { engine.apply (it) }
161
162
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
+ }
166
172
}
167
- }
168
173
}
169
174
controller.paused = true
170
175
}
You can’t perform that action at this time.
0 commit comments