Icaro Temponi
07/30/2019, 7:26 PMprivate 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 expectedDominaezzz
07/30/2019, 7:39 PMDominaezzz
07/30/2019, 7:40 PMonError
.Icaro Temponi
07/30/2019, 7:42 PM