use report instead of logger

This commit is contained in:
Denis Duliçi
2021-06-08 23:33:17 +03:00
parent 5ddfe315f4
commit 8dae25abc5
8 changed files with 14 additions and 19 deletions

View File

@ -6,8 +6,7 @@ use App\Events\Document\DocumentReminded;
use App\Models\Common\Company;
use App\Models\Document\Document;
use App\Notifications\Sale\Invoice as Notification;
use App\Utilities\Overrider;
use Date;
use App\Utilities\Date;
use Illuminate\Console\Command;
class InvoiceReminder extends Command
@ -80,10 +79,10 @@ class InvoiceReminder extends Command
foreach ($invoices as $invoice) {
try {
event(new DocumentReminded($invoice, Notification::class));
} catch (\Exception | \Throwable | \Swift_RfcComplianceException | \Illuminate\Database\QueryException $e) {
} catch (\Throwable $e) {
$this->error($e->getMessage());
logger('Invoice reminder:: ' . $e->getMessage());
report($e);
}
}
}