Kraken\Throwable\ThrowableProxy::toThrowable PHP Метод

toThrowable() публичный Метод

Return proxied Throwable.
public toThrowable ( ) : Error | Exception
Результат Error | Exception
    public function toThrowable()
    {
        $class = $this->class;
        $prev = $this->prev !== null ? $this->prev->toThrowable() : $this->prev;
        return preg_match('#^(\\\\?)Kraken#si', $class) ? new $class($this->message, $prev) : new $class($this->message, 0, $prev);
    }

Usage Example

Пример #1
0
 /**
  * @see Promise::getReason
  */
 protected function getReason()
 {
     return $this->reason instanceof ThrowableProxy ? $this->reason->toThrowable() : $this->reason;
 }