Hi everyone. So, I have the following function: ``...
# coroutines
i
Hi everyone. So, I have the following function:
Copy code
private fun barcodeFlow(): Flow<Barcode> = callbackFlow {
        val onNext: (t: Barcode) -> Unit = { barcode -> offer(barcode) }
        val onError: (t: Throwable) -> Unit = { ex -> throw ex }
        val disposable = binding
                .barcodeView
                .drawOverlay()
                .getObservable()
                .subscribe(onNext, onError)
        awaitClose { disposable.dispose() }
}
I just would like to know if the exception thrown inside the onError lambda will be propagated down the stream of this callbackFlow to be caught on a subsequent catch operator as expected
d
No I don't think so.
The exception will be passed back into whatever calls
onError
.
i
hm, makes sense 🤔