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

Breadcrumb

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

function RejectedPromise::__destruct

Throws

void

File

vendor/react/promise/src/Internal/RejectedPromise.php, line 32

Class

RejectedPromise
@internal

Namespace

React\Promise\Internal

Code

public function __destruct() {
    if ($this->handled) {
        return;
    }
    $handler = set_rejection_handler(null);
    if ($handler === null) {
        $message = 'Unhandled promise rejection with ' . $this->reason;
        \error_log($message);
        return;
    }
    try {
        $handler($this->reason);
    } catch (\Throwable $e) {
        \preg_match('/^([^:\\s]++)(.*+)$/sm', (string) $e, $match);
        \assert(isset($match[1], $match[2]));
        $message = 'Fatal error: Uncaught ' . $match[1] . ' from unhandled promise rejection handler' . $match[2];
        \error_log($message);
        exit(255);
    }
}

API Navigation

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