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; }