BaseService.php 370 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. *
  4. * @file:BaseService.php
  5. * @Date: 2023/5/30
  6. * @Time: 10:13
  7. */
  8. namespace Modules\Jiesuan\Services;
  9. use Catch\Exceptions\FailedException;
  10. class BaseService
  11. {
  12. protected static function throwErrMsg($msg,$code = ""){
  13. if ($code){
  14. throw new FailedException($msg,$code);
  15. }
  16. throw new FailedException($msg);
  17. }
  18. }