ClientException.php 774 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace AlibabaCloud\Client\Exception;
  3. use Exception;
  4. use RuntimeException;
  5. /**
  6. * Class ClientException
  7. *
  8. * @package AlibabaCloud\Client\Exception
  9. */
  10. class ClientException extends AlibabaCloudException
  11. {
  12. /**
  13. * ClientException constructor.
  14. *
  15. * @param string $errorMessage
  16. * @param string $errorCode
  17. * @param Exception|null $previous
  18. */
  19. public function __construct($errorMessage, $errorCode, $previous = null)
  20. {
  21. parent::__construct($errorMessage, 0, $previous);
  22. $this->errorMessage = $errorMessage;
  23. $this->errorCode = $errorCode;
  24. }
  25. /**
  26. * @codeCoverageIgnore
  27. * @deprecated
  28. */
  29. public function getErrorType()
  30. {
  31. return 'Client';
  32. }
  33. }