function RejectedPromise::__destruct
Throws
void
File
-
vendor/
react/ promise/ src/ Internal/ RejectedPromise.php, line 32
Class
- RejectedPromise
- @internal
Namespace
React\Promise\InternalCode
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);
}
}