From 0156b68f8e1c8b66159cec7d1eea13d42032bcf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 30 Mar 2021 11:41:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Server.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/HttpServer/Server.php b/HttpServer/Server.php index d1920c69..fa57b2f1 100644 --- a/HttpServer/Server.php +++ b/HttpServer/Server.php @@ -512,15 +512,19 @@ class Server extends HttpService { $event = Snowflake::app()->getEvent(); $event->on(Event::SERVER_WORKER_START, function () { - router()->loadRouterSetting(); + try { + var_dump(2222); - var_dump(2222); + router()->loadRouterSetting(); - $annotation = Snowflake::app()->getAttributes(); - $annotation->instanceDirectoryFiles(CONTROLLER_PATH); - $annotation->instanceDirectoryFiles(RPC_SERVICE_PATH); - $annotation->instanceDirectoryFiles(RPC_CLIENT_PATH); + $annotation = Snowflake::app()->getAttributes(); + $annotation->instanceDirectoryFiles(CONTROLLER_PATH); + $annotation->instanceDirectoryFiles(RPC_SERVICE_PATH); + $annotation->instanceDirectoryFiles(RPC_CLIENT_PATH); + } catch (\Throwable $exception) { + $this->addError($exception); + } }); }