mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-26 16:26:35 -06:00
Some clean up in the error handler.
This commit is contained in:
parent
46856c9394
commit
505f340917
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user