From f9076d3bac10c538828da56864637b2af0343e24 Mon Sep 17 00:00:00 2001 From: Aldarien Date: Fri, 25 Mar 2022 15:04:42 -0300 Subject: [PATCH] Error catching in API --- api/public/index.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/api/public/index.php b/api/public/index.php index e6d2557..4ccf8a4 100644 --- a/api/public/index.php +++ b/api/public/index.php @@ -1,7 +1,12 @@ run(); +try { + require_once implode(DIRECTORY_SEPARATOR, [ + dirname(__DIR__), + 'setup', + 'app.php' + ]); + $app->run(); +} catch (Error | Exception $e) { + error_log($e); + throw $e; +}