Merge pull request #1126 from openclassify/vedat

remove config
This commit is contained in:
Muammer Top 2021-07-28 15:25:04 +03:00 committed by GitHub
commit e261e0265b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 15 deletions

View File

@ -72,13 +72,12 @@ class ExceptionHandler extends Handler
public function report(Throwable $e) public function report(Throwable $e)
{ {
if (app()->bound('sentry') if (app()->bound('sentry') &&
&& $this->shouldReport($e) $this->shouldReport($e) &&
&& env('SENTRY_LARAVEL_DSN')) { env('SENTRY_LARAVEL_DSN') &&
if (config('app.enable_sentry_laravel')) { !empty(env('SENTRY_LARAVEL_DSN'))) {
app('sentry')->captureException($e); app('sentry')->captureException($e);
} }
}
if ($e instanceof Swift_TransportException) { if ($e instanceof Swift_TransportException) {
die(trans('visiosoft.theme.base::message.error_mail')); die(trans('visiosoft.theme.base::message.error_mail'));

View File

@ -269,7 +269,4 @@ return [
], ],
'enable_sentry_laravel' => env('ENABLE_SENTRY_LARAVEL',true),
]; ];