What will the following code print?
try {
flow { emit("") }
.catch { println("Caught exception") }
.map { throw Exception(); it }
.map { println("Processed"); it.uppercase() }
.onCompletion { exc -> exc?.let { println("Finished with error") } }
.collect()
} catch (_: Exception) {
println("Unhandled exception from flow")
}
Remember that all uncaught exceptions will be re-thrown after the completion