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

Breadcrumb

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

function ErrorFuture::catch

Overrides FutureInterface::catch

File

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

Class

ErrorFuture
@psalm-suppress MissingTemplateParam

Namespace

OpenTelemetry\SDK\Common\Future

Code

public function catch(Closure $closure) : FutureInterface {
    $c = $closure;
    unset($closure);
    try {
        return new CompletedFuture($c($this->throwable));
    } catch (Throwable $e) {
        return new ErrorFuture($e);
    }
}

API Navigation

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