<?php

declare(strict_types=1);

namespace Gls\GlsPoland\Soap\Client\Exception;

/**
 * Class SoapException
 */
class SoapException extends \RuntimeException
{
    /**
     * @param \Throwable $throwable
     *
     * @return SoapException
     */
    public static function fromThrowable(\Throwable $throwable): self
    {
        return new self($throwable->getMessage(), (int) $throwable->getCode(), $throwable);
    }
}
