Created
February 12, 2018 17:01
-
-
Save aanandshekharroy/b8c04991037eb1d1b3930037ce4b48ad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Observable.fromArray(1,2,3) | |
.doOnNext { | |
if(it==2){ | |
throw (RuntimeException("Exception on 2")) | |
} | |
} | |
.onExceptionResumeNext(Observable.just(10)) | |
.subscribeBy( | |
onNext = { | |
println(it) | |
},onError = { | |
println(it.message) | |
},onComplete = { | |
println("Complete") | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment