public static function create(\SoapClient $client, \Exception $exception)
    {
        $exception = new static($exception->getMessage(), $exception->getCode(), $exception);

        if (!empty($xml = $client->__getLastRequest())) {
            $exception->request = static::formatXml($xml);
        }
        if (!empty($xml = $client->__getLastResponse())) {
            $exception->response = static::formatXml($xml);
        }

        return $exception;
    }
public static function create(\SoapClient $client, \Exception $exception)
    {
        $exception = new static($exception->getMessage(), $exception->getCode(), $exception);

        if (!empty($xml = $client->__getLastRequest())) {
            $exception->request = static::formatXml($xml);
        }
        if (!empty($xml = $client->__getLastResponse())) {
            $exception->response = static::formatXml($xml);
        }

        return $exception;
    }
public static function create ( \ SoapClient $ client , \ Exception $ exception ) { $ exception = new static ( $ exception -> getMessage ( ) , $ exception -> getCode ( ) , $ exception ) ; if ( ! empty ( $ xml = $ client -> __getLastRequest ( ) ) ) { $ exception -> request = static :: formatXml ( $ xml ) ; } if ( ! empty ( $ xml = $ client -> __getLastResponse ( ) ) ) { $ exception -> response = static :: formatXml ( $ xml ) ; } return $ exception ; }
Creates a new client exception.

@param \SoapClient $client
@param \Exception  $exception

@return ClientException
Creates a new client exception .