SDKException.php 909 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace common\components\payment\joinpay\exceptions;
  3. /**
  4. * 自定义异常类
  5. * Class BizException
  6. * @package exceptions
  7. */
  8. class SDKException extends \Exception {
  9. const PARAM_ERROR = "10000";
  10. const BIZ_ERROR = "20000";
  11. private $bizCode;
  12. private $msg;
  13. function __construct(int $bizCode, string $msg) {
  14. parent::__construct();
  15. $this->bizCode = $bizCode;
  16. $this->msg = $msg;
  17. }
  18. /**
  19. * @return int
  20. */
  21. public function getBizCode()
  22. {
  23. return $this->bizCode;
  24. }
  25. /**
  26. * @entity int $bizCode
  27. */
  28. public function setBizCode($bizCode)
  29. {
  30. $this->bizCode = $bizCode;
  31. }
  32. /**
  33. * @return string
  34. */
  35. public function getMsg()
  36. {
  37. return $this->msg;
  38. }
  39. /**
  40. * @entity mixed $msg
  41. */
  42. public function setMsg($msg)
  43. {
  44. $this->msg = $msg;
  45. }
  46. }