PluginProbe
Gmail SMTP / trunk
Gmail SMTP vtrunk
1.2.3.21 1.2.3.20 trunk 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.9 1.2.0 1.2.3.14 1.2.3.15 1.2.3.16 1.2.3.18 1.2.3.5
gmail-smtp / google-api-php-client / vendor / guzzlehttp / guzzle / src / Exception / ConnectException.php

ConnectException.php in Gmail SMTP trunk, at google-api-php-client/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php

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