|
|
@@ -9,6 +9,7 @@ use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
|
|
use Illuminate\Http\Exceptions\HttpResponseException;
|
|
|
use Illuminate\Http\Request;
|
|
|
use Illuminate\Http\Response;
|
|
|
+use Illuminate\Support\Facades\Auth;
|
|
|
use Symfony\Component\HttpKernel\Exception\HttpException;
|
|
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
|
|
use Throwable;
|
|
|
@@ -58,6 +59,7 @@ class Handler extends ExceptionHandler
|
|
|
{
|
|
|
$errMsg='';
|
|
|
try{
|
|
|
+ $type = $exception['type'] ?? 'error';
|
|
|
$errMsg=(function()use($exception){
|
|
|
return $errMsg=
|
|
|
'异常: '
|
|
|
@@ -107,7 +109,9 @@ class Handler extends ExceptionHandler
|
|
|
$functionName,
|
|
|
($errMsg??'')
|
|
|
.'请求:'.json_encode($request->all())
|
|
|
- .'调用堆栈:'.$tracesAll
|
|
|
+ .'调用堆栈:'.$tracesAll,
|
|
|
+ Auth::id()??'',
|
|
|
+ $type
|
|
|
);
|
|
|
}
|
|
|
return parent::render($request, $exception);
|