~ballot/wordpress/openstack-objectstorage

« back to all changes in this revision

Viewing changes to vendor/guzzlehttp/guzzle/src/Exception/ParseException.php

  • Committer: Benjamin Allot
  • Date: 2020-07-02 16:31:38 UTC
  • Revision ID: benjamin.allot@canonical.com-20200702163138-qyk6njanak5uw2pg
Revert to revno 3

Show diffs side-by-side

added added

removed removed

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