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; }