PluginProbe
WP-Stateless – Google Cloud Storage / 2.1.4
WP-Stateless – Google Cloud Storage v2.1.4
4.4.3 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.3.0 2.3.1 2.3.2 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 All 62 releases
wp-stateless / lib / Google / vendor / react / promise / src / UnhandledRejectionException.php

UnhandledRejectionException.php in WP-Stateless – Google Cloud Storage 2.1.4, at lib/Google/vendor/react/promise/src/UnhandledRejectionException.php

32 lines 611 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace React\Promise;
4
5 class UnhandledRejectionException extends \RuntimeException
6 {
7 private $reason;
8
9 public static function resolve($reason)
10 {
11 if ($reason instanceof \Exception || $reason instanceof \Throwable) {
12 return $reason;
13 }
14
15 return new static($reason);
16 }
17
18 public function __construct($reason)
19 {
20 $this->reason = $reason;
21
22 $message = sprintf('Unhandled Rejection: %s', json_encode($reason));
23
24 parent::__construct($message, 0);
25 }
26
27 public function getReason()
28 {
29 return $this->reason;
30 }
31 }
32