예제 #1
0
        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))
예제 #2
0
    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)),
        )
예제 #3
0
 def create():
     return o1.pipe(ops.catch(o2))
예제 #4
0
        def create():
            def handler(e, source):
                handler_called[0] = True
                raise Exception(ex2)

            return o1.pipe(ops.catch(handler))
예제 #5
0
        def create():
            def handler(e, source):
                handler_called[0] = True
                return o2

            return reactivex.throw("ex").pipe(ops.catch(handler))
예제 #6
0
        def create():
            def handler(e, source):
                handler_called[0] = True
                return o2

            return o1.pipe(ops.catch(handler))