From 580514a9393585172ff1986c8390f80009905916 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Mon, 20 Feb 2023 23:41:34 +0800 Subject: [PATCH] add comments --- src/ZM/ConsoleApplication.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ZM/ConsoleApplication.php b/src/ZM/ConsoleApplication.php index a882caad..4423bd87 100644 --- a/src/ZM/ConsoleApplication.php +++ b/src/ZM/ConsoleApplication.php @@ -88,6 +88,7 @@ final class ConsoleApplication extends Application */ public function run(InputInterface $input = null, OutputInterface $output = null): int { + // 注册 bootstrap $options = $input?->getOptions() ?? ServerStartCommand::exportOptionArray(); foreach ($this->bootstrappers as $bootstrapper) { resolve($bootstrapper)->bootstrap($options); @@ -95,7 +96,7 @@ final class ConsoleApplication extends Application try { 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; exit(1); }