Files
san-reymoros/vendor/guzzlehttp/guzzle/src/Exception/ParseException.php
gauvainboiche 058c2110e9 first commit
2020-03-03 22:45:25 +01:00

32 lines
692 B
PHP

<?php
namespace GuzzleHttp\Exception;
use GuzzleHttp\Message\ResponseInterface;
/**
* Exception when a client is unable to parse the response body as XML or JSON
*/
class ParseException extends TransferException
{
/** @var ResponseInterface */
private $response;
public function __construct(
$message = '',
ResponseInterface $response = null,
\Exception $previous = null
) {
parent::__construct($message, 0, $previous);
$this->response = $response;
}
/**
* Get the associated response
*
* @return ResponseInterface|null
*/
public function getResponse()
{
return $this->response;
}
}