From d0b98edb2380489ddd36d62cb43336db48855a71 Mon Sep 17 00:00:00 2001 From: "d[esign]Void" Date: Tue, 26 May 2020 08:55:49 +0100 Subject: [PATCH 1/2] Update JsonHandler.php --- src/JsonHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/JsonHandler.php b/src/JsonHandler.php index 69f6c39..89c7ff8 100644 --- a/src/JsonHandler.php +++ b/src/JsonHandler.php @@ -11,11 +11,11 @@ trait JsonHandler * Handle the json response. Check if exception is treated. If true call * the specific handler. If false set the default response to be returned. * - * @param \Exception $exception + * @param \Throwable $exception * * @return \Illuminate\Http\JsonResponse */ - public function jsonResponse(Exception $exception) + public function jsonResponse(Throwable $exception) { $handler = new Handler($exception); From 9289852c78396c88bfb97e1a7d056dcb282089c8 Mon Sep 17 00:00:00 2001 From: "d[esign]Void" Date: Fri, 29 May 2020 17:12:13 +0100 Subject: [PATCH 2/2] Update JsonHandler.php --- src/JsonHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JsonHandler.php b/src/JsonHandler.php index 89c7ff8..af19e7c 100644 --- a/src/JsonHandler.php +++ b/src/JsonHandler.php @@ -2,8 +2,8 @@ namespace SMartins\Exceptions; -use Exception; use SMartins\Exceptions\Handlers\Handler; +use Throwable; trait JsonHandler {