feat : exception
This commit is contained in:
@@ -2,9 +2,14 @@
|
||||
|
||||
namespace App\Exception;
|
||||
|
||||
use App\Constants\ReturnCode;
|
||||
use Hyperf\Server\Exception\ServerException;
|
||||
|
||||
class ErrException extends ServerException
|
||||
{
|
||||
|
||||
/**
|
||||
* 重写抛出错误的状态码
|
||||
* @var int
|
||||
*/
|
||||
protected $code = ReturnCode::ERROR;
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Exception\Handler;
|
||||
|
||||
use App\Constants\ReturnCode;
|
||||
use App\Exception\ErrException;
|
||||
use App\Lib\AdminReturn;
|
||||
use App\Lib\ApiReturn;
|
||||
|
||||
Reference in New Issue
Block a user