From 4a861f18e840e6ad86384bb7ef2ac6343cfcc94c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 4 Aug 2021 15:54:38 +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 --- Server/HTTPServerListener.php | 4 ++-- System/Application.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Server/HTTPServerListener.php b/Server/HTTPServerListener.php index 2affb405..54cfd465 100644 --- a/Server/HTTPServerListener.php +++ b/Server/HTTPServerListener.php @@ -65,9 +65,9 @@ class HTTPServerListener extends Abstracts\Server { $exceptionHandler = Config::get('exception.http', null); if (!in_array(ExceptionHandlerInterface::class, class_implements($exceptionHandler))) { - $exceptionHandler = Snowflake::getDi()->get(ExceptionHandlerDispatcher::class); + $exceptionHandler = ExceptionHandlerDispatcher::class; } - $this->exceptionHandler = $exceptionHandler; + $this->exceptionHandler = Snowflake::getDi()->get($exceptionHandler); } diff --git a/System/Application.php b/System/Application.php index 3034f9a2..9cbe10eb 100644 --- a/System/Application.php +++ b/System/Application.php @@ -146,7 +146,7 @@ class Application extends BaseApplication } $data = response()->getBuilder($manager->execCommand($class)); } catch (\Throwable $exception) { - $data = logger()->exception($exception); + $data = response()->getBuilder(logger()->exception($exception)); } finally { print_r($data); Timer::clearAll();