Browse Source

refactor(Exception): 更新 NotFoundException 异常处理

- 在 NotFoundException 类中引入 error_response 函数
-优化异常处理逻辑,提高错误响应的可定制性
runphp 8 tháng trước cách đây
mục cha
commit
3546a86e77
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      src/Exception/ExceptionHandle.php

+ 1 - 0
src/Exception/ExceptionHandle.php

@@ -8,6 +8,7 @@ use think\exception\ValidateException;
 use think\Request;
 use think\Response;
 use Throwable;
+use function SixShop\Core\error_response;
 
 class ExceptionHandle extends Handle
 {