Skip to content

Commit

Permalink
better error handling upon email failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremykenedy authored May 22, 2017
1 parent bb28233 commit 08517ac
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Laravel-Exception-Notifier | A Laravel Exceptions Email Notification [Package](https://packagist.org/packages/jeremykenedy/laravel-exception-notifier) | v1.0.0
# Laravel-Exception-Notifier | A Laravel Exceptions Email Notification [Package](https://packagist.org/packages/jeremykenedy/laravel-exception-notifier)

[![Total Downloads](https://poser.pugx.org/jeremykenedy/laravel-exception-notifier/d/total.svg)](https://packagist.org/packages/jeremykenedy/laravel-exception-notifier)
[![Latest Stable Version](https://poser.pugx.org/jeremykenedy/laravel-exception-notifier/v/stable.svg)](https://packagist.org/packages/jeremykenedy/laravel-exception-notifier)
Expand Down Expand Up @@ -36,6 +36,7 @@ Laravel exception notifier will send an email of of the error along with the sta
```
use App\Mail\ExceptionOccured;
use Illuminate\Support\Facades\Log;
use Mail;
use Symfony\Component\Debug\ExceptionHandler as SymfonyExceptionHandler;
use Symfony\Component\Debug\Exception\FlattenException;
Expand All @@ -61,10 +62,8 @@ Laravel exception notifier will send an email of of the error along with the sta
$enableEmailExceptions = config('exceptions.emailExceptionEnabledDefault');
}
if ($enableEmailExceptions) {
if ($this->shouldReport($exception)) {
$this->sendEmail($exception);
}
if ($enableEmailExceptions && $this->shouldReport($exception)) {
$this->sendEmail($exception);
}
parent::report($exception);
Expand Down Expand Up @@ -92,7 +91,7 @@ Laravel exception notifier will send an email of of the error along with the sta
} catch (Exception $exception) {
dd($exception);
Log::error($exception);
}
}
Expand Down

0 comments on commit 08517ac

Please sign in to comment.