SDKException.php 902 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace addons\JoinPay\common\logic\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. }