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

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

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

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