mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-26 01:55:34 +08:00
add comments
This commit is contained in:
@@ -88,6 +88,7 @@ final class ConsoleApplication extends Application
|
|||||||
*/
|
*/
|
||||||
public function run(InputInterface $input = null, OutputInterface $output = null): int
|
public function run(InputInterface $input = null, OutputInterface $output = null): int
|
||||||
{
|
{
|
||||||
|
// 注册 bootstrap
|
||||||
$options = $input?->getOptions() ?? ServerStartCommand::exportOptionArray();
|
$options = $input?->getOptions() ?? ServerStartCommand::exportOptionArray();
|
||||||
foreach ($this->bootstrappers as $bootstrapper) {
|
foreach ($this->bootstrappers as $bootstrapper) {
|
||||||
resolve($bootstrapper)->bootstrap($options);
|
resolve($bootstrapper)->bootstrap($options);
|
||||||
@@ -95,7 +96,7 @@ final class ConsoleApplication extends Application
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
return parent::run($input, $output);
|
return parent::run($input, $output);
|
||||||
} catch (\Exception $e) {
|
} catch (\Throwable $e) {
|
||||||
echo zm_internal_errcode('E00005') . "{$e->getMessage()} at {$e->getFile()}({$e->getLine()})" . PHP_EOL;
|
echo zm_internal_errcode('E00005') . "{$e->getMessage()} at {$e->getFile()}({$e->getLine()})" . PHP_EOL;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user