You are here

public function FulfilledPromise::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/FulfilledPromise.php, line 73

Class

FulfilledPromise
A promise that has been fulfilled.

Namespace

GuzzleHttp\Promise

Code

public function reject($reason) {
  throw new \LogicException("Cannot reject a fulfilled promise");
}