PluginProbe
Metricool – Social media and site statistics / 2.1.1
Metricool – Social media and site statistics v2.1.1
2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.27 trunk
metricool / vendor / _scoped / guzzlehttp / guzzle / src / Exception / ConnectException.php

ConnectException.php in Metricool – Social media and site statistics 2.1.1, at vendor/_scoped/guzzlehttp/guzzle/src/Exception/ConnectException.php

46 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Metricool\Vendor\GuzzleHttp\Exception;
4
5 use Metricool\Vendor\Psr\Http\Client\NetworkExceptionInterface;
6 use Metricool\Vendor\Psr\Http\Message\RequestInterface;
7 /**
8 * Exception thrown when a connection cannot be established.
9 */
10 class ConnectException extends TransferException implements NetworkExceptionInterface
11 {
12 /**
13 * @var RequestInterface
14 */
15 private $request;
16 /**
17 * @var array
18 */
19 private $handlerContext;
20 public function __construct(string $message, RequestInterface $request, ?\Throwable $previous = null, array $handlerContext = [])
21 {
22 parent::__construct($message, 0, $previous);
23 $this->request = $request;
24 $this->handlerContext = $handlerContext;
25 }
26 /**
27 * Get the request that caused the exception
28 */
29 public function getRequest(): RequestInterface
30 {
31 return $this->request;
32 }
33 /**
34 * Get contextual information about the error from the underlying handler.
35 *
36 * The contents of this array will vary depending on which handler you are
37 * using. It may also be just an empty array. Relying on this data will
38 * couple you to a specific handler, but can give more debug information
39 * when needed.
40 */
41 public function getHandlerContext(): array
42 {
43 return $this->handlerContext;
44 }
45 }
46