BaseService.php
454 字节
<?php
/**
* @author:wlj
* @date: 2022/6/30 15:44
*/
namespace App\Services;
use App\Enums\Common\Code;
use App\Exceptions\BsideGlobalException;
class BaseService
{
/**
* @notes: 手动抛出异常
* @param string $code
* @throws BsideGlobalException
* @author:wlj
* @date: 2022/7/19 14:25
*/
public function fail(string $code = Code::SYSTEM_ERROR)
{
throw new BsideGlobalException($code);
}
}