Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ErrorFuture.php

class ErrorFuture

@psalm-suppress MissingTemplateParam

Hierarchy

  • class \OpenTelemetry\SDK\Common\Future\ErrorFuture implements \OpenTelemetry\SDK\Common\Future\FutureInterface

Expanded class hierarchy of ErrorFuture

2 files declare their use of ErrorFuture
PsrTransport.php in vendor/open-telemetry/sdk/Common/Export/Http/PsrTransport.php
StreamTransport.php in vendor/open-telemetry/sdk/Common/Export/Stream/StreamTransport.php

File

vendor/open-telemetry/sdk/Common/Future/ErrorFuture.php, line 13

Namespace

OpenTelemetry\SDK\Common\Future
View source
final class ErrorFuture implements FutureInterface {
    public function __construct(Throwable $throwable) {
    }
    public function await() : never {
        throw $this->throwable;
    }
    public function map(Closure $closure) : FutureInterface {
        return $this;
    }
    public function catch(Closure $closure) : FutureInterface {
        $c = $closure;
        unset($closure);
        try {
            return new CompletedFuture($c($this->throwable));
        } catch (Throwable $e) {
            return new ErrorFuture($e);
        }
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
ErrorFuture::await public function @psalm-return T Overrides FutureInterface::await
ErrorFuture::catch public function @psalm-template U
@psalm-param Closure(\Throwable): U $closure
@psalm-return FutureInterface<T|U>
Overrides FutureInterface::catch
ErrorFuture::map public function @psalm-template U
@psalm-param Closure(T): U $closure
@psalm-return FutureInterface<U>
Overrides FutureInterface::map
ErrorFuture::__construct public function

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal