Documentation

AwsException extends RuntimeException
in package
implements MonitoringEventsInterface, ResponseContainerInterface, ArrayAccess Uses HasDataTrait, HasMonitoringEventsTrait

Represents an AWS exception that is thrown when a command fails.

Interfaces, Classes and Traits

MonitoringEventsInterface
Interface for adding and retrieving client-side monitoring events
ResponseContainerInterface
ArrayAccess

Table of Contents

$command  : mixed
$connectionError  : mixed
$data  : array<string|int, mixed>
$errorCode  : mixed
$errorMessage  : mixed
$errorShape  : mixed
$errorType  : mixed
$maxRetriesExceeded  : mixed
$monitoringEvents  : mixed
$request  : mixed
$requestId  : mixed
$response  : ResponseInterface
$result  : mixed
$transferInfo  : mixed
__construct()  : mixed
__toString()  : mixed
appendMonitoringEvent()  : mixed
Append a client-side monitoring event to this object's event list
count()  : mixed
get()  : mixed
getAwsErrorCode()  : string|null
Get the AWS error code.
getAwsErrorMessage()  : string|null
Get the concise error message if any.
getAwsErrorShape()  : Shape|null
Get the AWS error shape.
getAwsErrorType()  : string|null
Get the AWS error type.
getAwsRequestId()  : string|null
Get the request ID of the error. This value is only present if a response was received and is not present in the event of a networking error.
getCommand()  : CommandInterface
Get the command that was executed.
getIterator()  : mixed
getMonitoringEvents()  : array<string|int, mixed>
Get client-side monitoring events attached to this object. Each event is represented as an associative array within the returned array.
getRequest()  : RequestInterface|null
Get the sent HTTP request if any.
getResponse()  : ResponseInterface|null
Get the received HTTP response if any.
getResult()  : ResultInterface|null
Get the result of the exception if available
getStatusCode()  : int|null
If available, gets the HTTP status code of the corresponding response
getTransferInfo()  : mixed|null|array<string|int, mixed>
Get all transfer information as an associative array if no $name argument is supplied, or gets a specific transfer statistic if a $name attribute is supplied (e.g., 'retries_attempted').
hasKey()  : mixed
isConnectionError()  : bool
Returns true if this is a connection error.
isMaxRetriesExceeded()  : bool
Returns whether the max number of retries is exceeded.
offsetExists()  : mixed
offsetGet()  : mixed|null
This method returns a reference to the variable to allow for indirect array modification (e.g., $foo['bar']['baz'] = 'qux').
offsetSet()  : mixed
offsetUnset()  : mixed
prependMonitoringEvent()  : mixed
Prepend a client-side monitoring event to this object's event list
search()  : mixed
setMaxRetriesExceeded()  : mixed
Sets the flag for max number of retries exceeded.
setTransferInfo()  : mixed
Replace the transfer information associated with an exception.
toArray()  : mixed

Properties

Methods

__construct()

public __construct(string $message, CommandInterface $command[, array<string|int, mixed> $context = [] ][, Exception $previous = null ]) : mixed
Parameters
$message : string

Exception message

$command : CommandInterface
$context : array<string|int, mixed> = []

Exception context

$previous : Exception = null

Previous exception (if any)

Return values
mixed

__toString()

public __toString() : mixed
Return values
mixed

appendMonitoringEvent()

Append a client-side monitoring event to this object's event list

public appendMonitoringEvent(array<string|int, mixed> $event) : mixed
Parameters
$event : array<string|int, mixed>
Return values
mixed

get()

public get(mixed $key) : mixed
Parameters
$key : mixed
Return values
mixed

getAwsErrorCode()

Get the AWS error code.

public getAwsErrorCode() : string|null
Return values
string|null

Returns null if no response was received

getAwsErrorMessage()

Get the concise error message if any.

public getAwsErrorMessage() : string|null
Return values
string|null

getAwsErrorShape()

Get the AWS error shape.

public getAwsErrorShape() : Shape|null
Return values
Shape|null

Returns null if no response was received

getAwsErrorType()

Get the AWS error type.

public getAwsErrorType() : string|null
Return values
string|null

Returns null if no response was received

getAwsRequestId()

Get the request ID of the error. This value is only present if a response was received and is not present in the event of a networking error.

public getAwsRequestId() : string|null
Return values
string|null

Returns null if no response was received

getIterator()

public getIterator() : mixed
Return values
mixed

getMonitoringEvents()

Get client-side monitoring events attached to this object. Each event is represented as an associative array within the returned array.

public getMonitoringEvents() : array<string|int, mixed>
Return values
array<string|int, mixed>

getStatusCode()

If available, gets the HTTP status code of the corresponding response

public getStatusCode() : int|null
Return values
int|null

getTransferInfo()

Get all transfer information as an associative array if no $name argument is supplied, or gets a specific transfer statistic if a $name attribute is supplied (e.g., 'retries_attempted').

public getTransferInfo([string $name = null ]) : mixed|null|array<string|int, mixed>
Parameters
$name : string = null

Name of the transfer stat to retrieve

Return values
mixed|null|array<string|int, mixed>

hasKey()

public hasKey(mixed $name) : mixed
Parameters
$name : mixed
Return values
mixed

isConnectionError()

Returns true if this is a connection error.

public isConnectionError() : bool
Return values
bool

isMaxRetriesExceeded()

Returns whether the max number of retries is exceeded.

public isMaxRetriesExceeded() : bool
Return values
bool

offsetExists()

public offsetExists(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetGet()

This method returns a reference to the variable to allow for indirect array modification (e.g., $foo['bar']['baz'] = 'qux').

public offsetGet( $offset) : mixed|null
Parameters
$offset :
Return values
mixed|null

offsetSet()

public offsetSet(mixed $offset, mixed $value) : mixed
Parameters
$offset : mixed
$value : mixed
Return values
mixed

offsetUnset()

public offsetUnset(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

prependMonitoringEvent()

Prepend a client-side monitoring event to this object's event list

public prependMonitoringEvent(array<string|int, mixed> $event) : mixed
Parameters
$event : array<string|int, mixed>
Return values
mixed
public search(mixed $expression) : mixed
Parameters
$expression : mixed
Return values
mixed

setMaxRetriesExceeded()

Sets the flag for max number of retries exceeded.

public setMaxRetriesExceeded() : mixed
Return values
mixed

setTransferInfo()

Replace the transfer information associated with an exception.

public setTransferInfo(array<string|int, mixed> $info) : mixed
Parameters
$info : array<string|int, mixed>
Return values
mixed

toArray()

public toArray() : mixed
Return values
mixed

Search results