protected function throwResponseException()
    {
        if (null === $this->data) {
            throw new ResponseException('Undecodable response was returned.');
        }

        if (isset($this->data['error'], $this->data['message'])) {
            throw new ResponseException($this->data['message'], $this->data['error']);
        }

        throw new ResponseException('Unknown error');
    }
protected function throwResponseException()
    {
        if (null === $this->data) {
            throw new ResponseException('Undecodable response was returned.');
        }

        if (isset($this->data['error'], $this->data['message'])) {
            throw new ResponseException($this->data['message'], $this->data['error']);
        }

        throw new ResponseException('Unknown error');
    }
protected function throwResponseException ( ) { if ( null === $ this -> data ) { throw new ResponseException ( 'Undecodable response was returned.' ) ; } if ( isset ( $ this -> data [ 'error' ] , $ this -> data [ 'message' ] ) ) { throw new ResponseException ( $ this -> data [ 'message' ] , $ this -> data [ 'error' ] ) ; } throw new ResponseException ( 'Unknown error' ) ; }
Throw an exception detailing what went wrong with this request.

@throws ResponseException
Throw an exception detailing what went wrong with this request .