Documentation

ConnectException extends TransferException
in package
implements NetworkExceptionInterface

Exception thrown when a connection cannot be established.

Note that no response is present for a ConnectException

Interfaces, Classes, Traits and Enums

NetworkExceptionInterface
Thrown when the request cannot be completed because of network issues.

Table of Contents

$handlerContext  : array<string|int, mixed>
$request  : RequestInterface
__construct()  : mixed
getHandlerContext()  : array<string|int, mixed>
Get contextual information about the error from the underlying handler.
getRequest()  : RequestInterface
Get the request that caused the exception

Properties

Methods

__construct()

public __construct(string $message, RequestInterface $request[, Throwable $previous = null ][, array<string|int, mixed> $handlerContext = [] ]) : mixed
Parameters
$message : string
$request : RequestInterface
$previous : Throwable = null
$handlerContext : array<string|int, mixed> = []
Return values
mixed

getHandlerContext()

Get contextual information about the error from the underlying handler.

public getHandlerContext() : array<string|int, mixed>

The contents of this array will vary depending on which handler you are using. It may also be just an empty array. Relying on this data will couple you to a specific handler, but can give more debug information when needed.

Return values
array<string|int, mixed>

Search results