Kraken\Promise\PromiseCancelled::__construct PHP Method

__construct() public method

public __construct ( Erro\Error | Exceptio\Exception | string | null $reason = null )
$reason Erro\Error | Exceptio\Exception | string | null
    public function __construct($reason = null)
    {
        if ($reason instanceof PromiseInterface) {
            throw new InvalidArgumentException('You cannot create PromiseCancelled with a promise. Use Promise::doCancel($promiseOrValue) instead.');
        }
        $this->reason = $reason;
    }