scratch – Blame information for rev
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
87 | office | 1 | <?php |
2 | |||
3 | namespace GuzzleHttp\Exception; |
||
4 | |||
5 | use GuzzleHttp\Message\ResponseInterface; |
||
6 | |||
7 | /** |
||
8 | * Exception when a client is unable to parse the response body as XML or JSON |
||
9 | */ |
||
10 | class ParseException extends TransferException |
||
11 | { |
||
12 | /** @var ResponseInterface */ |
||
13 | private $response; |
||
14 | |||
15 | public function __construct( |
||
16 | $message = '', |
||
17 | ResponseInterface $response = null, |
||
18 | \Exception $previous = null |
||
19 | ) { |
||
20 | parent::__construct($message, 0, $previous); |
||
21 | $this->response = $response; |
||
22 | } |
||
23 | /** |
||
24 | * Get the associated response |
||
25 | * |
||
26 | * @return ResponseInterface|null |
||
27 | */ |
||
28 | public function getResponse() |
||
29 | { |
||
30 | return $this->response; |
||
31 | } |
||
32 | } |