Skip to content

Instantly share code, notes, and snippets.

@bherbst
Created December 11, 2017 15:52
Show Gist options
  • Save bherbst/902400aa6c70508b1635f72dfdbadfce to your computer and use it in GitHub Desktop.
Save bherbst/902400aa6c70508b1635f72dfdbadfce to your computer and use it in GitHub Desktop.
RxJava - zipWith crash
val observable1 = Observable.error<Int>(Exception())
val observable2 = Observable.error<Int>(Exception())
val zipper = BiFunction<Int, Int, String> { one, two -> "$one - $two" }
observable1.zipWith(observable2, zipper)
.subscribe(
{ System.out.println(it) },
{ it.printStackTrace() }
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment