updated-packages

This commit is contained in:
RafficMohammed
2023-01-08 00:13:22 +05:30
parent 3ff7df7487
commit da241bacb6
12659 changed files with 563377 additions and 510538 deletions

View File

@@ -1,21 +1,26 @@
<?php
namespace Aws\Exception;
use Aws\Api\Shape;
use Aws\CommandInterface;
use Aws\HasDataTrait;
use Aws\HasMonitoringEventsTrait;
use Aws\MonitoringEventsInterface;
use Aws\ResponseContainerInterface;
use Aws\ResultInterface;
use JmesPath\Env as JmesPath;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\RequestInterface;
use Aws\CommandInterface;
use Aws\ResultInterface;
/**
* Represents an AWS exception that is thrown when a command fails.
*/
class AwsException extends \RuntimeException implements
MonitoringEventsInterface,
ResponseContainerInterface
ResponseContainerInterface,
\ArrayAccess
{
use HasDataTrait;
use HasMonitoringEventsTrait;
/** @var ResponseInterface */
@@ -26,6 +31,7 @@ class AwsException extends \RuntimeException implements
private $requestId;
private $errorType;
private $errorCode;
private $errorShape;
private $connectionError;
private $transferInfo;
private $errorMessage;
@@ -44,6 +50,7 @@ class AwsException extends \RuntimeException implements
array $context = [],
\Exception $previous = null
) {
$this->data = isset($context['body']) ? $context['body'] : [];
$this->command = $command;
$this->response = isset($context['response']) ? $context['response'] : null;
$this->request = isset($context['request']) ? $context['request'] : null;
@@ -52,6 +59,7 @@ class AwsException extends \RuntimeException implements
: null;
$this->errorType = isset($context['type']) ? $context['type'] : null;
$this->errorCode = isset($context['code']) ? $context['code'] : null;
$this->errorShape = isset($context['error_shape']) ? $context['error_shape'] : null;
$this->connectionError = !empty($context['connection_error']);
$this->result = isset($context['result']) ? $context['result'] : null;
$this->transferInfo = isset($context['transfer_stats'])
@@ -187,6 +195,16 @@ class AwsException extends \RuntimeException implements
return $this->errorCode;
}
/**
* Get the AWS error shape.
*
* @return Shape|null Returns null if no response was received
*/
public function getAwsErrorShape()
{
return $this->errorShape;
}
/**
* Get all transfer information as an associative array if no $name
* argument is supplied, or gets a specific transfer statistic if
@@ -234,4 +252,19 @@ class AwsException extends \RuntimeException implements
{
$this->maxRetriesExceeded = true;
}
public function hasKey($name)
{
return isset($this->data[$name]);
}
public function get($key)
{
return $this[$key];
}
public function search($expression)
{
return JmesPath::search($expression, $this->toArray());
}
}

View File

@@ -0,0 +1,7 @@
<?php
namespace Aws\Exception;
class CommonRuntimeException extends \RuntimeException
{
}

View File

@@ -0,0 +1,11 @@
<?php
namespace Aws\Exception;
/**
* This class represents exceptions related to logic surrounding client-side
* encryption usage.
*/
class CryptoException extends \RuntimeException
{
}

View File

@@ -0,0 +1,11 @@
<?php
namespace Aws\Exception;
/**
* Class CryptoPolyfillException
* @package Aws\Exception
*/
class CryptoPolyfillException extends \RuntimeException
{
}

View File

@@ -0,0 +1,11 @@
<?php
namespace Aws\Exception;
use Aws\HasMonitoringEventsTrait;
use Aws\MonitoringEventsInterface;
class IncalculablePayloadException extends \RuntimeException implements
MonitoringEventsInterface
{
use HasMonitoringEventsTrait;
}

View File

@@ -0,0 +1,11 @@
<?php
namespace Aws\Exception;
use Aws\HasMonitoringEventsTrait;
use Aws\MonitoringEventsInterface;
class InvalidJsonException extends \RuntimeException implements
MonitoringEventsInterface
{
use HasMonitoringEventsTrait;
}

View File

@@ -0,0 +1,11 @@
<?php
namespace Aws\Exception;
use Aws\HasMonitoringEventsTrait;
use Aws\MonitoringEventsInterface;
class InvalidRegionException extends \RuntimeException implements
MonitoringEventsInterface
{
use HasMonitoringEventsTrait;
}

View File

@@ -0,0 +1,11 @@
<?php
namespace Aws\Exception;
use Aws\HasMonitoringEventsTrait;
use Aws\MonitoringEventsInterface;
class TokenException extends \RuntimeException implements
MonitoringEventsInterface
{
use HasMonitoringEventsTrait;
}