Amp\Observer::getResult PHP Method

getResult() public method

Gets the result of the observable or throws the failure reason. Also throws an exception if the observable has not completed.
public getResult ( ) : mixed
return mixed Final return value of the observable.
    public function getResult()
    {
        if (!$this->resolved) {
            throw new \Error("The observable has not resolved");
        }
        if ($this->exception) {
            throw $this->exception;
        }
        return $this->result;
    }