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
Dominaezzz
07/30/2019, 7:39 PM
No I don't think so.
Dominaezzz
07/30/2019, 7:40 PM
The exception will be passed back into whatever calls