Kraken\Promise\PromiseCancelled::throwError PHP Метод

throwError() защищенный Метод

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);
    }