def create(): def handler1(e, source): first_handler_called[0] = True return o2 def handler2(e, source): second_handler_called[0] = True return o3 return o1.pipe(ops.catch(handler1), ops.catch(handler2))
def _retryable(self, data: str, delay: datetime.timedelta): return rx.of(data).pipe( ops.delay(duetime=delay, scheduler=self._scheduler), ops.map(lambda x: self._http(x)), ops.catch(handler=lambda exception, source: self._retry_handler( exception, source, data)), )
def create(): return o1.pipe(ops.catch(o2))
def create(): def handler(e, source): handler_called[0] = True raise Exception(ex2) return o1.pipe(ops.catch(handler))
def create(): def handler(e, source): handler_called[0] = True return o2 return reactivex.throw("ex").pipe(ops.catch(handler))
def create(): def handler(e, source): handler_called[0] = True return o2 return o1.pipe(ops.catch(handler))