composer update
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
<?php
|
||||
namespace Aws\Exception;
|
||||
|
||||
use Aws\HasMonitoringEventsTrait;
|
||||
use Aws\MonitoringEventsInterface;
|
||||
use Aws\ResponseContainerInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\RequestInterface;
|
||||
use Aws\CommandInterface;
|
||||
@@ -9,8 +12,12 @@ use Aws\ResultInterface;
|
||||
/**
|
||||
* Represents an AWS exception that is thrown when a command fails.
|
||||
*/
|
||||
class AwsException extends \RuntimeException
|
||||
class AwsException extends \RuntimeException implements
|
||||
MonitoringEventsInterface,
|
||||
ResponseContainerInterface
|
||||
{
|
||||
use HasMonitoringEventsTrait;
|
||||
|
||||
/** @var ResponseInterface */
|
||||
private $response;
|
||||
private $request;
|
||||
@@ -22,6 +29,8 @@ class AwsException extends \RuntimeException
|
||||
private $connectionError;
|
||||
private $transferInfo;
|
||||
private $errorMessage;
|
||||
private $maxRetriesExceeded;
|
||||
|
||||
|
||||
/**
|
||||
* @param string $message Exception message
|
||||
@@ -51,6 +60,8 @@ class AwsException extends \RuntimeException
|
||||
$this->errorMessage = isset($context['message'])
|
||||
? $context['message']
|
||||
: null;
|
||||
$this->monitoringEvents = [];
|
||||
$this->maxRetriesExceeded = false;
|
||||
parent::__construct($message, 0, $previous);
|
||||
}
|
||||
|
||||
@@ -205,4 +216,22 @@ class AwsException extends \RuntimeException
|
||||
{
|
||||
$this->transferInfo = $info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the max number of retries is exceeded.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isMaxRetriesExceeded()
|
||||
{
|
||||
return $this->maxRetriesExceeded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the flag for max number of retries exceeded.
|
||||
*/
|
||||
public function setMaxRetriesExceeded()
|
||||
{
|
||||
$this->maxRetriesExceeded = true;
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,14 @@
|
||||
<?php
|
||||
namespace Aws\Exception;
|
||||
|
||||
class CouldNotCreateChecksumException extends \RuntimeException
|
||||
use Aws\HasMonitoringEventsTrait;
|
||||
use Aws\MonitoringEventsInterface;
|
||||
|
||||
class CouldNotCreateChecksumException extends \RuntimeException implements
|
||||
MonitoringEventsInterface
|
||||
{
|
||||
use HasMonitoringEventsTrait;
|
||||
|
||||
public function __construct($algorithm, \Exception $previous = null)
|
||||
{
|
||||
$prefix = $algorithm === 'md5' ? "An" : "A";
|
||||
|
@@ -1,4 +1,11 @@
|
||||
<?php
|
||||
namespace Aws\Exception;
|
||||
|
||||
class CredentialsException extends \RuntimeException {}
|
||||
use Aws\HasMonitoringEventsTrait;
|
||||
use Aws\MonitoringEventsInterface;
|
||||
|
||||
class CredentialsException extends \RuntimeException implements
|
||||
MonitoringEventsInterface
|
||||
{
|
||||
use HasMonitoringEventsTrait;
|
||||
}
|
||||
|
@@ -1,10 +1,15 @@
|
||||
<?php
|
||||
namespace Aws\Exception;
|
||||
|
||||
use Aws\HasMonitoringEventsTrait;
|
||||
use Aws\MonitoringEventsInterface;
|
||||
use Aws\Multipart\UploadState;
|
||||
|
||||
class MultipartUploadException extends \RuntimeException
|
||||
class MultipartUploadException extends \RuntimeException implements
|
||||
MonitoringEventsInterface
|
||||
{
|
||||
use HasMonitoringEventsTrait;
|
||||
|
||||
/** @var UploadState State of the erroneous transfer */
|
||||
private $state;
|
||||
|
||||
|
@@ -1,4 +1,11 @@
|
||||
<?php
|
||||
namespace Aws\Exception;
|
||||
|
||||
class UnresolvedApiException extends \RuntimeException {}
|
||||
use Aws\HasMonitoringEventsTrait;
|
||||
use Aws\MonitoringEventsInterface;
|
||||
|
||||
class UnresolvedApiException extends \RuntimeException implements
|
||||
MonitoringEventsInterface
|
||||
{
|
||||
use HasMonitoringEventsTrait;
|
||||
}
|
||||
|
@@ -1,4 +1,11 @@
|
||||
<?php
|
||||
namespace Aws\Exception;
|
||||
|
||||
class UnresolvedEndpointException extends \RuntimeException {}
|
||||
use Aws\HasMonitoringEventsTrait;
|
||||
use Aws\MonitoringEventsInterface;
|
||||
|
||||
class UnresolvedEndpointException extends \RuntimeException implements
|
||||
MonitoringEventsInterface
|
||||
{
|
||||
use HasMonitoringEventsTrait;
|
||||
}
|
||||
|
@@ -1,4 +1,11 @@
|
||||
<?php
|
||||
namespace Aws\Exception;
|
||||
|
||||
class UnresolvedSignatureException extends \RuntimeException {}
|
||||
use Aws\HasMonitoringEventsTrait;
|
||||
use Aws\MonitoringEventsInterface;
|
||||
|
||||
class UnresolvedSignatureException extends \RuntimeException implements
|
||||
MonitoringEventsInterface
|
||||
{
|
||||
use HasMonitoringEventsTrait;
|
||||
}
|
||||
|
Reference in New Issue
Block a user