| 1 |
<?php |
| 2 |
|
| 3 |
namespace Dudlewebs\WPMCS\s3\Aws\Exception; |
| 4 |
|
| 5 |
/** |
| 6 |
* Represents an exception that was supplied via an EventStream. |
| 7 |
*/ |
| 8 |
class EventStreamDataException extends \RuntimeException |
| 9 |
{ |
| 10 |
private $errorCode; |
| 11 |
private $errorMessage; |
| 12 |
public function __construct($code, $message) |
| 13 |
{ |
| 14 |
$this->errorCode = $code; |
| 15 |
$this->errorMessage = $message; |
| 16 |
parent::__construct($message); |
| 17 |
} |
| 18 |
/** |
| 19 |
* Get the AWS error code. |
| 20 |
* |
| 21 |
* @return string|null Returns null if no response was received |
| 22 |
*/ |
| 23 |
public function getAwsErrorCode() |
| 24 |
{ |
| 25 |
return $this->errorCode; |
| 26 |
} |
| 27 |
/** |
| 28 |
* Get the concise error message if any. |
| 29 |
* |
| 30 |
* @return string|null |
| 31 |
*/ |
| 32 |
public function getAwsErrorMessage() |
| 33 |
{ |
| 34 |
return $this->errorMessage; |
| 35 |
} |
| 36 |
} |
| 37 |
|