From 1b12c899dcdfe83d98fc51976af4ac41a3284c52 Mon Sep 17 00:00:00 2001 From: shuixiang Date: Thu, 16 Sep 2021 12:15:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Exceptions/Handler.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index e2a4569..d59b8d9 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -36,11 +36,7 @@ class Handler extends ExceptionHandler */ public function register() { - $this->reportable(function (Throwable $e) { - if ($this->shouldReport($e) && app()->bound('sentry')) { - app('sentry')->captureException($e); - } - }); + // } /** @@ -49,6 +45,9 @@ class Handler extends ExceptionHandler */ public function report(Throwable $e): bool { + if ($this->shouldReport($e) && app()->bound('sentry')) { + app('sentry')->captureException($e); + } // 判断异常是否需要自定义报告... return false; }