ApiException
extends Exception
in package
ApiException class
This exception is thrown when an API error occurs. It extends the base PHP Exception class and adds functionality to store and retrieve the API response.
Table of Contents
Properties
- $response : mixed
Methods
- __construct() : mixed
- ApiException constructor.
- getResponse() : mixed
- Get the API response associated with this exception.
Properties
$response
private
mixed
$response
The API response associated with this exception.
Methods
__construct()
ApiException constructor.
public
__construct(string $message[, int $code = 0 ][, Exception|null $previous = null ][, mixed $response = null ]) : mixed
Parameters
- $message : string
-
The exception message.
- $code : int = 0
-
The exception code.
- $previous : Exception|null = null
-
The previous exception used for exception chaining.
- $response : mixed = null
-
The API response associated with this exception.
getResponse()
Get the API response associated with this exception.
public
getResponse() : mixed
Return values
mixed —The API response.