You are here

public function Coroutine::reject in Lockr 7.3

Reject the promise with the given reason.

Parameters

mixed $reason:

Throws

\RuntimeException if the promise is already resolved.

Overrides PromiseInterface::reject

File

vendor/guzzlehttp/promises/src/Coroutine.php, line 98

Class

Coroutine
Creates a promise that is resolved using a generator that yields values or promises (somewhat similar to C#'s async keyword).

Namespace

GuzzleHttp\Promise

Code

public function reject($reason) {
  $this->result
    ->reject($reason);
}