Kraken\Throwable\ThrowableProxy::__construct PHP Method

__construct() public method

public __construct ( Error | Exception | string[] | string $throwableOrMessage )
$throwableOrMessage Error | Exception | string[] | string
    public function __construct($throwableOrMessage)
    {
        if ($throwableOrMessage instanceof \Error || $throwableOrMessage instanceof \Exception) {
            $prev = $throwableOrMessage->getPrevious();
            $this->class = get_class($throwableOrMessage);
            $this->message = $throwableOrMessage->getMessage();
            $this->prev = $prev === null ? null : new ThrowableProxy($prev);
        } else {
            if (is_array($throwableOrMessage)) {
                $this->class = $throwableOrMessage[0];
                $this->message = $throwableOrMessage[1];
                $this->prev = null;
            } else {
                $this->class = 'Exception';
                $this->message = $throwableOrMessage;
                $this->prev = null;
            }
        }
    }