From 556b60f2569a12d315d471a89556881883be5b5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 26 Nov 2020 11:37:10 +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 --- Database/Command.php | 3 +-- HttpServer/Service/Abstracts/Tcp.php | 4 ++-- System/Abstracts/BaseObject.php | 2 ++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Database/Command.php b/Database/Command.php index e5c49156..b120e7d5 100644 --- a/Database/Command.php +++ b/Database/Command.php @@ -203,8 +203,7 @@ class Command extends Component $this->debug($this->sql . '。 Run-time: ' . (microtime(true) - $time)); } } catch (\Throwable $exception) { - $this->addError($this->sql . '. error: ' . $exception->getMessage(), 'mysql'); - $result = []; + $result = $this->addError($this->sql . '. error: ' . $exception->getMessage(), 'mysql'); } finally { return $result; } diff --git a/HttpServer/Service/Abstracts/Tcp.php b/HttpServer/Service/Abstracts/Tcp.php index 1a0986cd..b103377d 100644 --- a/HttpServer/Service/Abstracts/Tcp.php +++ b/HttpServer/Service/Abstracts/Tcp.php @@ -14,11 +14,11 @@ abstract class Tcp extends Server implements Service use \HttpServer\Service\Abstracts\Server; /** @var Closure|array */ - public Closure|array $unpack; + public $unpack; /** @var Closure|array */ - public Closure|array $pack; + public $pack; } diff --git a/System/Abstracts/BaseObject.php b/System/Abstracts/BaseObject.php index 0c5dfdef..337e418d 100644 --- a/System/Abstracts/BaseObject.php +++ b/System/Abstracts/BaseObject.php @@ -99,6 +99,8 @@ class BaseObject implements Configure } $this->error($message); } + $logger = Snowflake::app()->getLogger(); + $logger->error($message, $model); return FALSE; }