mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 14:01:07 +00:00
调整使用终止函数打印报错问题
This commit is contained in:
parent
0c0ead6176
commit
0c17eebc59
@ -17,6 +17,7 @@ use crmeb\exceptions\ApiException;
|
||||
use crmeb\exceptions\AuthException;
|
||||
use think\db\exception\DbException;
|
||||
use think\exception\Handle;
|
||||
use think\exception\HttpResponseException;
|
||||
use think\exception\ValidateException;
|
||||
use think\facade\Env;
|
||||
use think\facade\Log;
|
||||
@ -81,6 +82,9 @@ class AdminApiExceptionHandle extends Handle
|
||||
*/
|
||||
public function render($request, Throwable $e): Response
|
||||
{
|
||||
if ($e instanceof HttpResponseException) {
|
||||
return parent::render($request, $e);
|
||||
}
|
||||
$massageData = Env::get('app_debug', false) ? [
|
||||
'message' => $e->getMessage(),
|
||||
'file' => $e->getFile(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user