NetworkException
extends ClientException
in package
implements
NetworkExceptionInterface
Thrown when the request cannot be completed because of network issues.
There is no response object as this exception is thrown when no response has been received.
Example: the target host name can not be resolved or the connection failed.
Table of Contents
Interfaces
- NetworkExceptionInterface
Properties
- $request : RequestInterface
Methods
- __construct() : mixed
- Client exception construction.
- getRequest() : RequestInterface
- Returns the request.
Properties
$request
protected
RequestInterface
$request
= null
Methods
__construct()
Client exception construction.
public
__construct(RequestInterface $request[, string $message = '' ][, int $code = 0 ][, Throwable|null $previous = null ]) : mixed
Parameters
- $request : RequestInterface
-
Client request
- $message : string = ''
-
The exception message
- $code : int = 0
-
The exception code
- $previous : Throwable|null = null
-
Previous throwable
getRequest()
Returns the request.
public
getRequest() : RequestInterface
The request object MAY be a different object from the one passed to ClientInterface::sendRequest()