EventStreamDataException.php 783 B

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