src/Http/Response.php
/**
     * Throw an exception if there has been an error in the request.
     *
     * @return void
     *
     * @throws \ChinLeung\Converge\Exceptions\InvalidRequestFormatException
     */
Throw an exception if there has been an error in the request.
@return void


Throw an exception if there has been an error in the request . @return void
protected function throwException(): void
    {
        if ($this->xml->errorName->count() === 0) {
            return;
        }
        tap($this->getExceptionClass(), function (string $exception) {
            throw new $exception(sprintf(
                '[Error %d]: %s',
                $this->xml->errorCode,
                $this->xml->errorMessage
            ));
        });
    }
protected function throwException ( ) : void { if ( $ this -> xml -> errorName -> count ( ) === 0 ) { return ; } tap ( $ this -> getExceptionClass ( ) , function ( string $ exception ) { throw new $ exception ( sprintf ( '[Error %d]: %s' , $ this -> xml -> errorCode , $ this -> xml -> errorMessage ) ) ; } ) ; }
Throw an exception if there has been an error in the request.
Throw an exception if there has been an error in the request .