Error catching in API
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user