From 505f340917099b4d9e32388501a46d2d5c8a79f6 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 12 Feb 2016 14:15:49 +0100 Subject: [PATCH] Some clean up in the error handler. --- app/Exceptions/Handler.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 1abd62f597..99e2dbdaac 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -2,6 +2,7 @@ declare(strict_types = 1); namespace FireflyIII\Exceptions; +use Auth; use ErrorException; use Exception; use Illuminate\Auth\Access\AuthorizationException; @@ -13,7 +14,7 @@ use Mail; use Request; use Swift_TransportException; use Symfony\Component\HttpKernel\Exception\HttpException; -use Auth; + /** * Class Handler * @@ -68,14 +69,11 @@ class Handler extends ExceptionHandler if ($exception instanceof FireflyException || $exception instanceof ErrorException) { - // log - Log::error($exception->getMessage()); - // mail? try { $email = env('SITE_OWNER'); - $user = Auth::user(); - $args = [ + $user = Auth::user(); + $args = [ 'errorMessage' => $exception->getMessage(), 'stacktrace' => $exception->getTraceAsString(), 'file' => $exception->getFile(), @@ -99,7 +97,6 @@ class Handler extends ExceptionHandler // could also not mail! :o Log::error($e->getMessage()); } - } parent::report($exception);