Kraken\Promise\PromiseCancelled::throwError PHP Method

throwError() protected method

protected throwError ( Erro\Error | Exceptio\Exception | string $reason )
$reason Erro\Error | Exceptio\Exception | string
    protected function throwError($reason)
    {
        if ($reason instanceof Error || $reason instanceof Exception) {
            throw $reason;
        }
        throw new CancellationException($reason);
    }