Cleanup of cli
This commit is contained in:
@ -7,9 +7,8 @@ $app = require_once implode(DIRECTORY_SEPARATOR, [
|
||||
Monolog\ErrorHandler::register($app->getContainer()->get(Psr\Log\LoggerInterface::class));
|
||||
try {
|
||||
$app->run();
|
||||
} catch (Error | Exception $e) {
|
||||
$logger = $app->getContainer()->get(Psr\Log\LoggerInterface::class);
|
||||
$logger->debug(Safe\json_encode(compact('_SERVER')));
|
||||
$logger->error($e);
|
||||
throw $e;
|
||||
} catch (Error $e) {
|
||||
$app->getContainer()->get(Psr\Log\LoggerInterface::class)->error($e);
|
||||
} catch (Exception $e) {
|
||||
$app->getContainer()->get(Psr\Log\LoggerInterface::class)->warning($e);
|
||||
}
|
||||
|
Reference in New Issue
Block a user