You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

WechatReplyException.php 552B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace crmeb\exceptions;
  3. use Throwable;
  4. /**
  5. * 微信消息回复错误
  6. * Class WechatReplyException
  7. */
  8. class WechatReplyException extends \RuntimeException
  9. {
  10. public function __construct($message = "", $code = 0, Throwable $previous = null)
  11. {
  12. if (is_array($message)) {
  13. $errInfo = $message;
  14. $message = $errInfo[1] ?? '未知错误';
  15. if ($code === 0) {
  16. $code = $errInfo[0] ?? 400;
  17. }
  18. }
  19. parent::__construct($message, $code, $previous);
  20. }
  21. }