[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/vendor/react/promise/src/ -> UnhandledRejectionException.php (source)

   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  }


Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1