public function fail(\Throwable $reason)
    {
        if (null !== $this->started) {
            $this->started->reject(new CompletedError());
        }

        $this->delayed->reject($reason);
    }
public function fail(\Throwable $reason)
    {
        if (null !== $this->started) {
            $this->started->reject(new CompletedError());
        }

        $this->delayed->reject($reason);
    }
public function fail ( \ Throwable $ reason ) { if ( null !== $ this -> started ) { $ this -> started -> reject ( new CompletedError ( ) ) ; } $ this -> delayed -> reject ( $ reason ) ; }
Throws an error in the observable.

@param \Throwable $reason
Throws an error in the observable .