1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Handler.php

This commit is contained in:
= 2020-11-01 16:16:37 +11:00
parent 6479b2fd3e
commit 0077df1be7

View File

@ -12,6 +12,7 @@
namespace App\Exceptions; namespace App\Exceptions;
use App\Exceptions\GenericPaymentDriverFailure; use App\Exceptions\GenericPaymentDriverFailure;
use App\Models\Account;
use Exception; use Exception;
use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Auth\AuthenticationException; use Illuminate\Auth\AuthenticationException;
@ -27,14 +28,14 @@ use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use Illuminate\Validation\ValidationException; use Illuminate\Validation\ValidationException;
use PDOException; use PDOException;
use Sentry\State\Scope;
use Swift_TransportException; use Swift_TransportException;
use Symfony\Component\Console\Exception\CommandNotFoundException; use Symfony\Component\Console\Exception\CommandNotFoundException;
use function Sentry\configureScope;
use Sentry\State\Scope;
use Symfony\Component\Debug\Exception\FatalThrowableError; use Symfony\Component\Debug\Exception\FatalThrowableError;
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Throwable; use Throwable;
use function Sentry\configureScope;
class Handler extends ExceptionHandler class Handler extends ExceptionHandler
{ {
@ -71,9 +72,12 @@ class Handler extends ExceptionHandler
{ {
if (! Schema::hasTable('accounts')) { if (! Schema::hasTable('accounts')) {
info('account table not found'); info('account table not found');
return; return;
} }
// if(Account::count() == 0){
// info("handler - account table not found");
// return;
// }
if (app()->bound('sentry') && $this->shouldReport($exception)) { if (app()->bound('sentry') && $this->shouldReport($exception)) {
app('sentry')->configureScope(function (Scope $scope): void { app('sentry')->configureScope(function (Scope $scope): void {