Skip to content

Commit 08517ac

Browse files
authored
better error handling upon email failure
1 parent bb28233 commit 08517ac

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

readme.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Laravel-Exception-Notifier | A Laravel Exceptions Email Notification [Package](https://packagist.org/packages/jeremykenedy/laravel-exception-notifier) | v1.0.0
1+
# Laravel-Exception-Notifier | A Laravel Exceptions Email Notification [Package](https://packagist.org/packages/jeremykenedy/laravel-exception-notifier)
22

33
[![Total Downloads](https://poser.pugx.org/jeremykenedy/laravel-exception-notifier/d/total.svg)](https://packagist.org/packages/jeremykenedy/laravel-exception-notifier)
44
[![Latest Stable Version](https://poser.pugx.org/jeremykenedy/laravel-exception-notifier/v/stable.svg)](https://packagist.org/packages/jeremykenedy/laravel-exception-notifier)
@@ -36,6 +36,7 @@ Laravel exception notifier will send an email of of the error along with the sta
3636
3737
```
3838
use App\Mail\ExceptionOccured;
39+
use Illuminate\Support\Facades\Log;
3940
use Mail;
4041
use Symfony\Component\Debug\ExceptionHandler as SymfonyExceptionHandler;
4142
use Symfony\Component\Debug\Exception\FlattenException;
@@ -61,10 +62,8 @@ Laravel exception notifier will send an email of of the error along with the sta
6162
$enableEmailExceptions = config('exceptions.emailExceptionEnabledDefault');
6263
}
6364
64-
if ($enableEmailExceptions) {
65-
if ($this->shouldReport($exception)) {
66-
$this->sendEmail($exception);
67-
}
65+
if ($enableEmailExceptions && $this->shouldReport($exception)) {
66+
$this->sendEmail($exception);
6867
}
6968
7069
parent::report($exception);
@@ -92,7 +91,7 @@ Laravel exception notifier will send an email of of the error along with the sta
9291
9392
} catch (Exception $exception) {
9493
95-
dd($exception);
94+
Log::error($exception);
9695
9796
}
9897
}

0 commit comments

Comments
 (0)