Skip to content

Commit 1f07c77

Browse files
committed
adding additional catch block to handle less-epecific Exceptions being thrown
1 parent 8b74437 commit 1f07c77

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/controllers/AdminController.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,17 @@ protected function resolveDynamicFormRequestErrors(Request $request)
653653
$fieldFactory = app('admin_field_factory');
654654
} catch (\ReflectionException $e) {
655655
return null;
656+
} catch(\Exception $e) {
657+
/* TODO: this doesn't fix the issue, just keeps things that are using it from failing here
658+
Once the issue is fixed, these debug logs should be removed.
659+
*/
660+
\Illuminate\Support\Facades\Log::debug("app('itemconfig') failed. ");
661+
\Illuminate\Support\Facades\Log::debug("exception type is: " . get_class($e));
662+
\Illuminate\Support\Facades\Log::debug("exception is: " . $e->getMessage());
663+
\Illuminate\Support\Facades\Log::debug($e->getTraceAsString());
664+
return null;
656665
}
666+
657667
if (array_key_exists('form_request', $config->getOptions())) {
658668
try {
659669
$model = $config->getFilledDataModel($request, $fieldFactory->getEditFields(), $request->id);

0 commit comments

Comments
 (0)