iex
01/28/2020, 6:46 AMResult as return type)?alexsullivan114
01/28/2020, 12:47 PMResult or Either object is one approach that I often use.iex
01/29/2020, 8:08 AMObservable<Result> too to make things more convenient?alexsullivan114
01/29/2020, 12:30 PMiex
01/29/2020, 1:19 PMResult seems to be the only way to circumvent the issues. It's weird that rx doesn't allow to fully recover from errors.alexsullivan114
01/29/2020, 1:24 PMmyObservable.create { emitter ->
emitter.onNext(1)
emitter.onNext(2)
throw new RuntimeException("Crash!")
}
How should rx allow you to "recover"? Something threw an error that wasn't caught. All it can do is basically let you catch it yourself (i.e. the onError block) or crash. It can't really just "continue" since an exception was thrown.iex
01/31/2020, 4:15 PM