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

Table of Contents

Interfaces

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

Properties

$handlerContext  : array<string|int, mixed>
$request  : RequestInterface

Methods

__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|null $previous = null ][, array<string|int, mixed> $handlerContext = [] ]) : mixed
Parameters
$message : string
$request : RequestInterface
$previous : Throwable|null = null
$handlerContext : array<string|int, 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>

        
On this page

Search results