Mercurial > hg > isophonics-drupal-site
annotate vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 namespace GuzzleHttp\Exception; |
Chris@0 | 3 |
Chris@0 | 4 use Psr\Http\Message\RequestInterface; |
Chris@0 | 5 use Psr\Http\Message\ResponseInterface; |
Chris@0 | 6 |
Chris@0 | 7 /** |
Chris@0 | 8 * Exception when an HTTP error occurs (4xx or 5xx error) |
Chris@0 | 9 */ |
Chris@0 | 10 class BadResponseException extends RequestException |
Chris@0 | 11 { |
Chris@0 | 12 public function __construct( |
Chris@0 | 13 $message, |
Chris@0 | 14 RequestInterface $request, |
Chris@0 | 15 ResponseInterface $response = null, |
Chris@0 | 16 \Exception $previous = null, |
Chris@0 | 17 array $handlerContext = [] |
Chris@0 | 18 ) { |
Chris@0 | 19 if (null === $response) { |
Chris@0 | 20 @trigger_error( |
Chris@0 | 21 'Instantiating the ' . __CLASS__ . ' class without a Response is deprecated since version 6.3 and will be removed in 7.0.', |
Chris@0 | 22 E_USER_DEPRECATED |
Chris@0 | 23 ); |
Chris@0 | 24 } |
Chris@0 | 25 parent::__construct($message, $request, $response, $previous, $handlerContext); |
Chris@0 | 26 } |
Chris@0 | 27 } |