updated-packages
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
7
vendor/aws/aws-sdk-php/src/Exception/CommonRuntimeException.php
vendored
Normal file
7
vendor/aws/aws-sdk-php/src/Exception/CommonRuntimeException.php
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
namespace Aws\Exception;
|
||||
|
||||
class CommonRuntimeException extends \RuntimeException
|
||||
{
|
||||
|
||||
}
|
||||
11
vendor/aws/aws-sdk-php/src/Exception/CryptoException.php
vendored
Normal file
11
vendor/aws/aws-sdk-php/src/Exception/CryptoException.php
vendored
Normal 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
|
||||
{
|
||||
|
||||
}
|
||||
11
vendor/aws/aws-sdk-php/src/Exception/CryptoPolyfillException.php
vendored
Normal file
11
vendor/aws/aws-sdk-php/src/Exception/CryptoPolyfillException.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Aws\Exception;
|
||||
|
||||
/**
|
||||
* Class CryptoPolyfillException
|
||||
* @package Aws\Exception
|
||||
*/
|
||||
class CryptoPolyfillException extends \RuntimeException
|
||||
{
|
||||
|
||||
}
|
||||
11
vendor/aws/aws-sdk-php/src/Exception/IncalculablePayloadException.php
vendored
Normal file
11
vendor/aws/aws-sdk-php/src/Exception/IncalculablePayloadException.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Aws\Exception;
|
||||
|
||||
use Aws\HasMonitoringEventsTrait;
|
||||
use Aws\MonitoringEventsInterface;
|
||||
|
||||
class IncalculablePayloadException extends \RuntimeException implements
|
||||
MonitoringEventsInterface
|
||||
{
|
||||
use HasMonitoringEventsTrait;
|
||||
}
|
||||
11
vendor/aws/aws-sdk-php/src/Exception/InvalidJsonException.php
vendored
Normal file
11
vendor/aws/aws-sdk-php/src/Exception/InvalidJsonException.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Aws\Exception;
|
||||
|
||||
use Aws\HasMonitoringEventsTrait;
|
||||
use Aws\MonitoringEventsInterface;
|
||||
|
||||
class InvalidJsonException extends \RuntimeException implements
|
||||
MonitoringEventsInterface
|
||||
{
|
||||
use HasMonitoringEventsTrait;
|
||||
}
|
||||
11
vendor/aws/aws-sdk-php/src/Exception/InvalidRegionException.php
vendored
Normal file
11
vendor/aws/aws-sdk-php/src/Exception/InvalidRegionException.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Aws\Exception;
|
||||
|
||||
use Aws\HasMonitoringEventsTrait;
|
||||
use Aws\MonitoringEventsInterface;
|
||||
|
||||
class InvalidRegionException extends \RuntimeException implements
|
||||
MonitoringEventsInterface
|
||||
{
|
||||
use HasMonitoringEventsTrait;
|
||||
}
|
||||
11
vendor/aws/aws-sdk-php/src/Exception/TokenException.php
vendored
Normal file
11
vendor/aws/aws-sdk-php/src/Exception/TokenException.php
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace Aws\Exception;
|
||||
|
||||
use Aws\HasMonitoringEventsTrait;
|
||||
use Aws\MonitoringEventsInterface;
|
||||
|
||||
class TokenException extends \RuntimeException implements
|
||||
MonitoringEventsInterface
|
||||
{
|
||||
use HasMonitoringEventsTrait;
|
||||
}
|
||||
Reference in New Issue
Block a user