PluginProbe
Depicter — Popup & Slider Builder / 2.0.0
Depicter — Popup & Slider Builder v2.0.0
4.8.1 trunk 1.0.0 1.1.0 1.1.2 1.1.4 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.5 1.3.8 1.5.0 1.5.1 1.5.2 1.5.5 1.6.0 1.6.1 1.6.2 1.7.0 All 76 releases
depicter / modules / GuzzleHttp / Exception / ConnectException.php

ConnectException.php in Depicter — Popup & Slider Builder 2.0.0, at modules/GuzzleHttp/Exception/ConnectException.php

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