ApiException.php 340 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * @package merchant
  4. *
  5. * @author xaboy
  6. * @day 2020-04-10
  7. *
  8. *
  9. */
  10. namespace crmeb\exceptions;
  11. use think\exception\HttpResponseException;
  12. class ApiException extends HttpResponseException
  13. {
  14. public function __construct($message, $code = 400)
  15. {
  16. parent::__construct(app('json')->make($code, $message));
  17. }
  18. }