2
namespace GuzzleHttp\Exception;
4
use GuzzleHttp\Message\ResponseInterface;
7
* Exception when a client is unable to parse the response body as XML or JSON
9
class ParseException extends TransferException
11
/** @var ResponseInterface */
14
public function __construct(
16
ResponseInterface $response = null,
17
\Exception $previous = null
19
parent::__construct($message, 0, $previous);
20
$this->response = $response;
23
* Get the associated response
25
* @return ResponseInterface|null
27
public function getResponse()
29
return $this->response;