Rx\Functional\Operator\CatchErrorTest::catchError_HandlerThrows PHP Method

catchError_HandlerThrows() public method

    public function catchError_HandlerThrows()
    {
        $error = new \Exception();
        $error2 = new \InvalidArgumentException();
        $o1 = $this->createHotObservable([onNext(150, 1), onNext(210, 2), onNext(220, 3), onError(230, $error)]);
        $results = $this->scheduler->startWithCreate(function () use($o1, $error2) {
            return $o1->catchError(function () use($error2) {
                throw $error2;
            });
        });
        $this->assertMessages([onNext(210, 2), onNext(220, 3), onError(230, $error2)], $results->getMessages());
    }