No Description

BatchDeleteFailException.php 967B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace AliyunMNS\Exception;
  3. use AliyunMNS\Constants;
  4. use AliyunMNS\Exception\MnsException;
  5. use AliyunMNS\Model\DeleteMessageErrorItem;
  6. /**
  7. * BatchDelete could fail for some receipt handles,
  8. * and BatchDeleteFailException will be thrown.
  9. * All failed receiptHandles are saved in "$deleteMessageErrorItems"
  10. */
  11. class BatchDeleteFailException extends MnsException
  12. {
  13. protected $deleteMessageErrorItems;
  14. public function __construct($code, $message, $previousException = NULL, $requestId = NULL, $hostId = NULL)
  15. {
  16. parent::__construct($code, $message, $previousException, Constants::BATCH_DELETE_FAIL, $requestId, $hostId);
  17. $this->deleteMessageErrorItems = array();
  18. }
  19. public function addDeleteMessageErrorItem(DeleteMessageErrorItem $item)
  20. {
  21. $this->deleteMessageErrorItems[] = $item;
  22. }
  23. public function getDeleteMessageErrorItems()
  24. {
  25. return $this->deleteMessageErrorItems;
  26. }
  27. }
  28. ?>