From e9cda2f67d228c59780d97e84a9f20e4fa7c7b01 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Mon, 21 Jun 2021 18:57:38 +0200 Subject: [PATCH] Log NamiException --- app/Exceptions/Handler.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 59c585dc..d69cdbc6 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -4,6 +4,7 @@ namespace App\Exceptions; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Throwable; +use Zoomyboy\LaravelNami\NamiException; class Handler extends ExceptionHandler { @@ -36,6 +37,13 @@ class Handler extends ExceptionHandler */ public function report(Throwable $exception) { + if (is_a($exception, NamiException::class)) { + \Log::error($exception->getMessage(), [ + 'request' => $exception->request, + 'response' => $exception->response + ]); + } + parent::report($exception); }