Icicle\Awaitable\Internal\RejectedAwaitable::done PHP Метод

done() публичный Метод

public done ( callable $onFulfilled = null, callable $onRejected = null )
$onFulfilled callable
$onRejected callable
    public function done(callable $onFulfilled = null, callable $onRejected = null)
    {
        $exception = $this->exception;
        if (null !== $onRejected) {
            try {
                $onRejected($exception);
                return;
            } catch (Throwable $exception) {
                // Code below will rethrow exception from loop.
            }
        }
        Loop\queue(function () use($exception) {
            throw $exception;
            // Rethrow exception in uncatchable way.
        });
    }