From e09d6148ecc43916a4cf00359a41fec8e347e6a2 Mon Sep 17 00:00:00 2001 From: Pulkit Kathuria Date: Wed, 30 Mar 2022 19:14:26 +0900 Subject: [PATCH] should fix #8 error exception --- src/LaravelRequestDocs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LaravelRequestDocs.php b/src/LaravelRequestDocs.php index 8ee7b03..506c627 100644 --- a/src/LaravelRequestDocs.php +++ b/src/LaravelRequestDocs.php @@ -133,7 +133,7 @@ public function appendRequestRules(array $controllersInfo) if ($requestClass && method_exists($requestClass, 'rules')) { try { $controllersInfo[$index]['rules'] = $this->flattenRules($requestClass->rules()); - } catch (Exception $e) { + } catch (Throwable $e) { // disabled. This only works when the rules are defined as 'required|integer' and that too in single line // doesn't work well when the same rule is defined as array ['required', 'integer'] or in multiple lines such as // If your rules are not populated using this library, then fix your rule to only throw validation errors and not throw exceptions