Error catching in API

This commit is contained in:
2022-03-25 15:04:42 -03:00
parent 2b3b475d91
commit f9076d3bac

View File

@ -1,7 +1,12 @@
<?php
require_once implode(DIRECTORY_SEPARATOR, [
dirname(__DIR__),
'setup',
'app.php'
]);
$app->run();
try {
require_once implode(DIRECTORY_SEPARATOR, [
dirname(__DIR__),
'setup',
'app.php'
]);
$app->run();
} catch (Error | Exception $e) {
error_log($e);
throw $e;
}