异常修改

This commit is contained in:
张松 2025-08-18 14:14:53 +08:00
parent 32b0cbb0d1
commit 74838c56ab
1 changed files with 3 additions and 1 deletions

View File

@ -42,7 +42,9 @@ class MyExceptionHandle extends ExceptionHandler implements ExceptionHandlerInte
{
if (!($exception instanceof MyBusinessException)) {
Log::error("捕获到全局异常,异常类,".$exception::class." 异常信息: ".$exception->getMessage());
Log::error($exception->getTraceAsString());
if (!($exception instanceof SysException)) {
Log::error($exception->getTraceAsString());
}
return json( [
'code' => -1,
'message' => $exception->getMessage(),