From 707faec5be05c5e94cf333c539a63e9a2ba123b8 Mon Sep 17 00:00:00 2001 From: Muammer Top Date: Fri, 12 Mar 2021 12:54:47 +0300 Subject: [PATCH] #3540 Sentry Enabled/Disabled add Senttings --- app/Exceptions/ExceptionHandler.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Exceptions/ExceptionHandler.php b/app/Exceptions/ExceptionHandler.php index 316887aca..79492d1b8 100644 --- a/app/Exceptions/ExceptionHandler.php +++ b/app/Exceptions/ExceptionHandler.php @@ -87,7 +87,11 @@ class ExceptionHandler extends Handler public function report(Exception $e) { - if (!setting_value('visiosoft.module.advs::disable_sentry') && app()->bound('sentry') && $this->shouldReport($e)) { + if (!setting_value('visiosoft.module.advs::disable_sentry') + && app()->bound('sentry') + && $this->shouldReport($e) + && env('SENTRY_LARAVEL_DSN')) { + app('sentry')->captureException($e); }